home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / datasheets and manuals / Hardware / ti hardware compendium.txt < prev    next >
Text File  |  2006-10-19  |  293KB  |  6,481 lines

  1.  
  2.  
  3. ============================================================================
  4.  
  5.                   TI Hardware Manual.
  6.  
  7.  This document started life as a compendium of information on different 
  8.  memory acess methods for memory cards on the TI-99/4a home computer. 
  9.  
  10.  Different pieces of good technical messages and articles have been sewn 
  11.  together that were sitting around on my hard drive. My  hope is that 
  12.  this information will be of use to other remaining TI Hobbyist. 
  13.  
  14.  This compendium of information is copyrighted material of Dan Eicher, 
  15.  and my not be edited, changed or redistributed. 
  16.  
  17.  All articles and message, individually remain the exclusive property 
  18.  of their authors.
  19.  
  20.  As time permits I will add more information to this document. If you have
  21.  anything you wouldn't mind contributing, I will be pleased to add it. 
  22.  
  23.  If you find information that is in error, please send me an update and that
  24.  will also be added. If you have comments like, gee... can you add this 
  25.  that or the other, or I would have done it this way ect... Please send
  26.  all of these comments to NoOneCares@Null.Com. 
  27.  
  28.  
  29.  
  30. Thanks to the following TI Enthusist for their contributions:
  31.  
  32.                         Paolo Bagnaresi
  33.                          Jerry Coffey
  34.                         Bruce Harrison
  35.                          Beery Miller
  36.                            Jim Ness 
  37.                         David Nieters
  38.                       Thierry Nouspikel
  39.                          Don O'Neil
  40.                         David Ormand
  41.                         Jeff H. White
  42.  
  43.  
  44.                           Dan H. Eicher
  45.                         Eicher@Delphi.Com
  46.                     www.delphi.com/people/eicher 
  47.  
  48.                           L.D.O.M. 12.29.96
  49.  
  50. ==========================================================================
  51.  
  52. INDEX
  53.  
  54.  
  55. Myarc 512K Memory Card.
  56. From Myarc Documentation....................................DTIHM001
  57.  
  58. Foundation 128K Memory Card.
  59. From Foundation Documentation...............................DTIHM002
  60.  
  61. Rambo.
  62. Excerpt from the Horizon Manual.............................DTIHM003
  63.  
  64. AMS Memory Expansion Card.
  65. by Bruce Harrison...........................................DTIHM004
  66.  
  67. Corcomp Memory Expansion Card.
  68. by Jeff White...............................................DTIHM005
  69.  
  70. Western Horizon Technology AT Keyboard Interface.
  71. by Don O'Neil...............................................DTIHM006
  72. by David Nieters............................................DTIHM007
  73.  
  74. MBP - Clock A/D&D/A. 
  75. by Dan H. Eicher............................................DTIHM008
  76.  
  77. Super Space.
  78. from Information found in Micropendium......................DTIHM009
  79.  
  80. Super Space II Cartridge.
  81. from Original Documentation - Thanks to David Ormand........DTIHM010
  82.  
  83. Internals of the DEC command.
  84. by Jeff White...............................................DTIHM011
  85.  
  86. 99/4a clock speeds and assembly timing.
  87. by Jeff White...............................................DTIHM012
  88.  
  89. The TMS9985.
  90. by Dan Eicher...............................................DTIHM013
  91.  
  92. The TMS99105A.
  93. by Dan Eicher...............................................DTIHM014
  94.  
  95. Bugs in the console interupt routine.
  96. by Jeff White...............................................DTIHM015
  97.  
  98. Setting up user interupt routines.
  99. by Jeff White...............................................DTIHM016
  100.  
  101. Interupts
  102. by Jim Ness.................................................DTIHM017
  103.  
  104. RS232 Circular Interupt Buffer.
  105. by Texas Instruments........................................DTIHM018
  106.  
  107. Corcomp RS232 & PIO internals.
  108. by Jeff White...............................................DTIHM019
  109.  
  110. Bringing your Myarc RS232 into the 90's
  111. by Jeff White and Dan Eicher................................DTIHM020
  112.  
  113. A definition of skew.
  114. by Jeff White...............................................DTIHM021
  115.  
  116. 3.5" Drives and the Geneve.
  117. by Jeff White...............................................DTIHM022
  118.  
  119. Disk Controllers -- an Addendum   March, 1987
  120. by Jerry Coffey.............................................DTIHM023
  121.  
  122. A Hard Drive Odessey (Oddity)
  123. By Dan H. Eicher and Jeffrey H. White.......................DTIHM024 
  124.  
  125. The 9224: A failed experiment or an educational experience?
  126. by Dan H. Eicher and Jeffrey H. White.......................DTIHM025
  127.  
  128. Fixing Blown Bit Maps on the HFDC
  129. by Edward Hallett...........................................DTIHM026
  130.  
  131. VDPID & CPUID
  132. by Jeff White...............................................DTIHM027
  133.  
  134. An Explination of Bit Map Mode
  135. by Jeff White...............................................DTIHM028
  136.  
  137. Graphics 4 Mode Tutorial 
  138. by David Nieters............................................DTIHM029
  139.  
  140. In search of.... Leading Edge Connectors. 
  141. by Dan H. Eicher............................................DTIHM030
  142.  
  143. Modify the Rave Speech Card and MBP Card for use with the Geneve.
  144. by Beery Miller.............................................DTIHM031
  145.  
  146. Pin definition for the new Rave expansion box.
  147. re-typed by Dan Eicher......................................DTIHM032
  148.  
  149. TI-99/4 - THE EARLY DAYS
  150. by Herbert H.  Taylor.......................................DTIHM033
  151.  
  152. 9900,9901,9902,9904 by Definitions
  153. by Dan Eicher...............................................DTIHM034
  154.  
  155. Console Connectors
  156. by Thierry Norspikel........................................DTIHM035
  157.  
  158. How to adapt Atari joystick to work on the TI.
  159. Author Unknown..............................................DTIHM036
  160.  
  161. Grand Ram Technical Manual
  162. by DataBioTics & SofMachine Inc.............................DTIHM037
  163.  
  164. Myarc FDC Technical Information/Manual
  165. by Paolo Bagnaresi..........................................DTIHM038
  166.  
  167. DX-10 OPCODES AND MNEMONICS
  168. by Texas Instruments Inc....................................DTIHM039
  169.  
  170. =============================================================================
  171. DTIHM001
  172.  
  173.  
  174. Accessing Extra Memory on the Myarc Memory Expansion Card.
  175.  
  176. From the Myarc Memory Expansion Manual....
  177.  
  178. To access the additional 96K or RAM (in addition to the standard 32K) with
  179. assembly language, the following is a useful discussion on its operation.
  180.  
  181. The 128K RAM is divided into 4 banks of 32K each. When enabled, each bank
  182. occupies memory locations >2000->3FFF and >A000-FFFF. The mechanism to select a
  183. particular memory bank is determined by CRU bits >1002 and >1004. When these
  184. bits are zero, the normal 32K memory expansion is enabled. The other 3 banks are
  185. selected by setting the proper combination of bits. The following examples show
  186. how to select each of the four memory banks from assembly language excuting from
  187. "PAD" RAM:
  188.  
  189. Select Bank 2                           Select Bank 4
  190. LI      R12,>1000                       LI      R12,>1000
  191. SBO     1                               SBO     1
  192. SBZ     2                               SBO     2
  193.  
  194. Select Bank 3                           Select "Standard 32K Ram"
  195. LI      R12,>1000                       LI      R12,>1000
  196. SBZ     1                               SBZ     1
  197. SBO     2                               SBZ     2
  198.  
  199. Note: 512K card uses the additional CRU bits >1006 and >1008 to access
  200. the additional banks.
  201.  
  202. LI      R12,>1000
  203. SBZ     1  \
  204. SBZ     2    \ This would select the Standard 32K Ram Memory.
  205. SBZ     3   /
  206. SBZ     4 /
  207.  
  208. Note: These cards respond at >1000 + >1900!
  209.  
  210. A simpler way to page the Myarc memory cards is with LDCR instructions.
  211. Here are a few examples:
  212.  
  213. BANK1   BYTE 0
  214. BANK2   BYTE 1
  215. BANK3   BYTE 2
  216. BANK4   BYTE 3
  217. BANK5   BYTE 4
  218. ... (assign byte values 5 thru 12 to BANK6 thru BANK13)
  219. BANK14  BYTE 13
  220. BANK15  BYTE 14
  221. BANK16  BYTE 15
  222.  
  223. Select Bank 1         Select Bank 13     Page through banks
  224. LI     R12,>1000      LI    R12,>1000        LI    R12,>1000
  225. LDCR   @BANK1,4       MOVB  @BANK13,R1       LI    R1,BANK1
  226.                       LDCR  R1,4             LI    R2,16
  227.                                          NB  LDCR  *R1+,4
  228. Page backward all banks                      DEC   R2
  229.     LI    R12,>1000                          JNE   NB
  230.     LI    R1,BANK15
  231. PB  LDCR  R1,4
  232.     JEQ   FI
  233.     DEC   R1
  234.     JMP   PB
  235. FI  ... (next instruction)
  236.  
  237. =============================================================================
  238. DTIHM002
  239.  
  240. Foundation 128K Card
  241.  
  242. The Myarc Memory Expansion card is almost identical to the Foundation card,
  243. the only real difference is the CRU address for banking. These two cards
  244. are so close that Travis Watford produced an article on how you could upgrade a
  245. Foundation 128K Card to 512K and make it so that it could accept a Myarc 512K
  246. DSR eprom.
  247.  
  248. It should be noted, orginally the Foundation came with NO DSR eprom and was
  249. strictly usable as memory expansion.
  250.  
  251.  
  252. CRU ADDRESS
  253.  
  254. Select Bank 2                           Select Bank 4
  255. LI      R12,>1E00                       LI      R12,>1E00
  256. SBO     1                               SBO     1
  257. SBZ     2                               SBO     2
  258.  
  259. Select Bank 3                           Select "Standard 32K Ram"
  260. LI      R12,>1E00                       LI      R12,>1E00
  261. SBZ     1                               SBZ     1
  262. SBO     2                               SBZ     2
  263.  
  264. ==============================================================================
  265. DTIHM003
  266.  
  267. From the Rambo/Horizon User Operating Manual
  268.  
  269.  
  270. Rambo
  271.  
  272. This section of the manual will try to explain the memory managment sub-program
  273. called >B0 and how to interface with it using assembly code. This low-level
  274. sub-program will only work on Horizon cards with the RAMBO hardware installed.
  275. If you need more help on using the sub-program see section 5.6 of this manual.
  276.  
  277. The orginal Horizon hardware only allowed the Horizon memory to be accessed in
  278. 2K blocks at the DSR space from >5800 thru >5fff. The rest of the DSR space from
  279. >4000 thru >57ff was reserved for the Horizon ROS. This limited access to the
  280. memory on the Horizon card was fine for uses like a ramdisk, but to write a
  281. program which really executed from and used the Horizon memory was almost
  282. impossible. There needed to be a new way of accessing the Horizon memory, but
  283. without losing the wonderful and powerful ramdisk features and functions. With
  284. this in mine, we decided to design a simple upgrade kit for all Horizon cards
  285. which would allow the upgraded Horizon to work the same in the original Horizon
  286. mode; but when accessed thru a new mode it would switch to a whole new paging
  287. system which would be better designed for writing large programs, etc. The ROS
  288. would also have to be upgraded to support the new mode by adding a super memory
  289. management sub-program to ease in the writing of large programs as well as
  290. allowing both ramdisk files and program space to share the same memory.
  291.  
  292. Finally, with the RAMBO hardware and the SERIES 8 software, it was now possible
  293. to write large programs or programs which used the RAMBO program space for DATA
  294. storage very easily. The SERIES 8 software added a sub-program called >B0 to
  295. handle the complex memory management needed to make sure all programs run
  296. perfectly without destroying any files or other programs which may be sharing
  297. the memory on-board the Horizon card.
  298.  
  299. All the values for the sub-program >B0 are transfered thru CPU PAD addresses,
  300. which will be explained later on. Access to the sub-program >B0 is similar to
  301. the normal DSRLNK type >8 which is for DSR devices like "DSK1.", and "RS232.";
  302. except the DSR only needs a 2 byte VDP PAB of >01B0, the first byte being the
  303. length, and the second byte being the sub-program name >B0. The following
  304. section is divided into five different parts, the first two explaining the CRU
  305. interface bits, and the last three explaining the three different ways to access
  306. the sub-program >B0.
  307.  
  308. ORIGINAL HORIZON CRU INTERFACE ACCESS:
  309.  
  310. The orginal Horizon interface has a CRU address range from >1000 thru >1700, and
  311. the 8 or 16 CRU bits are defined as follows:
  312.  
  313. CRU BITS  | Definition fo the CRU interface bits   (15=MSBit / 0=LSBit)
  314. -----------------------------------------------------------------------
  315. 0          = 6K >4000 OFF/ON (0=ROS OFF, 1=ROS ON) Ised by ROS and DSRLNK
  316. 1 thru 7   = 2K >5800 Page number 0 thru 127. (Max. of 256K for 8K*8 cards).
  317. 8 thru 9   = Select one of four banks of 256K of memory.
  318.              (Max. of 1024 for 32K*8 cards).
  319. 10 thru 11 = Select one of four banks of 1024 of memory.
  320.              (Max. of 4096K for 128K*8 cards).
  321. 12 thru 14 = Undefined, may be used on a future series of Horizon cards.
  322. 15         = Reset to 0: Used to change to RAMBO mode,
  323.              on original Horizons it was undefined.
  324.  
  325. RAMBO CRU INTERFACE ACCESS:
  326.  
  327. A Horizon card with RAMBO installed can work the same as an original Horizon as
  328. detailed above or when bit 15 or the CRU interface is set to 1, it can be
  329. accessed as follows:
  330.  
  331.  
  332.  
  333. CRU BITS  | Definition fo the CRU interface bits   (15=MSBit / 0=LSBit)
  334. -----------------------------------------------------------------------
  335. 0          = 6K >4000 OFF/ON (0=ROS OFF, 1=ROS ON) Ised by ROS and DSRLNK
  336. 1 thru 2   = Not used when in RAMBO mode, recommended both be reset to 0.
  337. 3 thru 7   = 8K >6000 Page number 0 thru 31. (Max. of 256K for 8K*8 cards).
  338. 8 thru 9   = Select one of four banks of 256K of memory.
  339.              (Max. of 1024K for 32K*8 cards).
  340. 10 thru 11 = Select one of four banks of 1024K of memory.
  341.              (Max. of 4096K for 128K*8 cards).
  342. 12 thru 14 = Undefined, may be used on a future series of Horizon cards.
  343. 15         = Set to 1: Used to change to original Horizon mode.
  344.  
  345.  
  346. ACCESS MODE #1 FOR SUB-PROGRAMS >B0 (Gets Max. number of free 8K pages):
  347.  
  348. >834A    IN      Must be cleared before access to get true number of free pages.
  349.          OUT     Max. number of free 8K pages for all RAMBO's in the TI system.
  350. >834C    IN      >0000 = Gets the Max. number of free 8K pages in the system.
  351.          OUT     Not changed, will be the same value as IN.
  352. >8350    IN      Not used for input to the sub-program >B0.
  353.          OUT     >0000 if no errors, or >FFFF if errors where detected.
  354.  
  355. Accessing >B0 with >834A and > 834C cleared will, upon exit, return to the
  356. program in >834A the max. number of free 8K pages for all RAMBO's in the system.
  357. This access causes all cards to be switched to orginal Horizon mode, and being
  358. so can't be accessed from within the >6000 thru  >7FFF space. The following is
  359. an assembly example which is accessed like: BL @GETMAX
  360.  
  361.         REF     VMBW,DSRLNK     Normal VMBW and DSRLNK E/A BLWP's.
  362. GETMAX  CLR     @>834A          Clear Max. number of pages.
  363.         CLR     @>834C          Ask for max. number of free 8K pages.
  364.         LI      R0,VDPPAB       Address of the PAB in VDP memory.
  365.         LI      R1,CALLBO       Address of the PAB in CPU memory.
  366.         LI      R2,2            Length of the PAB to be written to VDP memory.
  367.         BLWP    @VMBW           Write the PAB (>01B0) to VDP memory.
  368.         MOV     R0,@>8356       Make >8356 point to the length byte of the
  369.                                 PAB in VDP ram.
  370.         BLWP    @DSRLNK         Execute the sub-program >B0.
  371.         DATA    >A
  372.         MOV     @>8350,R0       Check for errors. EQUAL BIT IS SET IF NO ERR!
  373.         RT                      Return to program.
  374. CALLBO  DATA    >01B0           PAB data for sub-program >B0.
  375.  
  376. ACCESS MODE #2 FOR SUB-PROGRAM >B0 (Selects an 8K page and turns on RAMBO):
  377.  
  378. >834A    IN      Not used for input to the sub-program >B0.
  379.          OUT     CRU address of the RAMBO/HORIZON card that is currently on.
  380. >834C    IN      A page number from 1 to max. number of free 8K pages.
  381.          OUT     The 16 bit CRU value used to select the page and turn RAMBO on.
  382. >8350    IN      Not used for input to the sub-program >B0.
  383.          OUT     >0000 if no errors, or >FFFF if errors where detected.
  384.  
  385. Accessing >B0 with >834C containing the number of the page you want will turn on
  386. the correct RAMBO/HORIZON card and then select the page you specified, and upon
  387. exit will return the CRU address and CRU value used to select the page in >834A
  388. and >834C. This command also overrides any cartridge which may be plugged into
  389. the module port, and will also turn off the P-Gram card if it was on. This
  390. function makes sure no other device is responding at the same >6000 space of
  391. memory. The following is an assembly example which is accessed like: BL @SETPAG
  392. with the next line containing a line of DATA with the number of the page you
  393. want.
  394.  
  395.         REF     VMBW,DSKLNK     Normal VMBW and DSRLNK E/A BLWP's
  396. SETPAG  MOV     *R11+,@>834C    Get number of the page to select.
  397.         LI      R0,VDPPAB       Address of the PAB in VDP memory.
  398.         LI      R1,CALLBO       Address of the PAB in CPU memory.
  399.         LI      R2,2            Length of the PAB to be written to VDP memory.
  400.         BLWP    @VMBW           Write the PAB (>01B0) to VDP memory.
  401.         MOV     R0,@>8356       Make >8356 point to the length byte of the
  402.                                 PAB in VDP.
  403.         BLWP    @DSRLNK         Execute the sub-program >B0.
  404.         DATA    >A
  405.         MOV     @>8350,R0       Check for errors. EQUAL BIT IS SET IF NO ERR!
  406.         RT
  407. CALLBO  DATA    >01B0           PAB data for sub-program >B0.
  408.  
  409. ACCESS MODE #3 FOR SUB-PROGRAM >B0 (Turns off all RAMBO/HORIZON cards):
  410.  
  411. >834A    IN      Not used for input to the sub-program >B0.
  412.          OUT     Not changed will be the same value as IN.
  413. >834C    IN      >FFFF = Tell all cards to switch back to original Horizon mode.
  414.          OUT     Not changed, will be the same value as IN.
  415. >8350    IN      Not used for input to the sub-program >B0.
  416.          OUT     >0000 if no errors, or >FFFF if errors where detected.
  417.  
  418. Accessing >B0 with >834C containing >FFFF will tell all the Horizon cards in
  419. your computer system to switch back to original Horizon mode. This call, since
  420. it will remove any page at >6000, can't be accessed from the >6000 space. If for
  421. some reason a RAMBO program doesn't switch all the cards back to original
  422. Horizon mode, the ROS will do a complete reset any time the TI Title Screen
  423. appears. The previous assembly examples should be enough to firure out how to use
  424. this mode of sub-program >B0.
  425.  
  426.  
  427. ==============================================================================
  428. DTIHM004
  429.  
  430. The AMS Memory Expansion Card.
  431.  
  432.                             AN ADVENTURE WITH AMS
  433.                               FROM TWO VIEWPOINTS
  434.                           By Bruce Harrison & Lew King
  435.  
  436.              People are buying the Advanced Memory System (AMS) now that
  437.         it's being produced and sold by the SW99ers of Tucson, AZ.  One
  438.         of those customers is Lew King, from Industry PA, who's
  439.         co-authoring this article.  His perspective as an owner will
  440.         follow, but for the moment it's the viewpoint of an experienced
  441.         Assembly programmer.
  442.  
  443.              There are two potential kinds of applications for the AMS
  444.         memory card.  One is the creation of massive programs, in which
  445.         the code to operate the program needs more than 32K of RAM.
  446.         That's not the forte of this particular Assembly programmer.
  447.         The second kind of application is one in which the program
  448.         itself occupies only part of the 32K memory, but the program
  449.         needs large blocks of memory to handle data.  For example, you
  450.         might have a word processor like Funnelweb where the text buffer
  451.         could be expanded to perhaps 16 times what Funnelweb could
  452.         normally handle.  Now that's the kind of application that gets
  453.         Bruce Harrison's attention.
  454.  
  455.              At the M.U.G. in Cleveland, Lew King bought his AMS card,
  456.         with 256K capacity.  When I asked what he'd do with all that
  457.         memory, he quickly came up with an idea for me to pursue.  Some
  458.         time back, I produced my Video Titler program, which uses Bit
  459.         Map images.  Just one such image (for example a TI-Artist
  460.         picture with color included) occupies 12K bytes of memory.  Two
  461.         such images completely fill the high portion of the 32K memory.
  462.  
  463.              Thus in the original Video Titler, the program code and
  464.         internal data had to fit entirely in low memory, starting at
  465.         >2678, so that all of high memory from >A000 thru >FFFF could be
  466.         used to store two complete bit-map color pictures.  That meant
  467.         that after just one "wipe" transition, the user would have to
  468.         pause the VCR, load the next frame from disk, then proceed to
  469.         the next transition.  That works, but it's labor intensive and
  470.         slow work for the user.  Lew immediately saw the possibility for
  471.         pre-loading many frames into the AMS, so that pauses for re-load
  472.         from disk would be minimized.
  473.  
  474.              Having this idea to work with was of course just the start.
  475.         To make a working program, we had to have some definitive words
  476.         on how to take advantage of the AMS in terms of Assembly Source.
  477.         Nobody at the Cleveland gathering had that kind of information
  478.         at his fingertips.  There is no published source (until now) for
  479.         that kind of information.  After a couple of unsuccessful
  480.         attempts to get the needed information, I asked Lew to print out
  481.         and send me the "docs" that were delivered on disk with his AMS
  482.         card.  Lew complied, and within two days I had printed docs plus
  483.         several disks.  As it turned out, it was fortunate indeed that
  484.         Lew included those disks, because one of them contained a source
  485.         file called AMSINI.  That sounded like it could be important,
  486.         and it was.  AMSINI contained the key source code segments to
  487.         make use of the card.  There was still a problem, however, in
  488.         that some of the material in the printed docs contradicted parts
  489.         of the AMSINI source file.
  490.  
  491.              After working through a chain of informants, I got in touch
  492.         with Rich Gilbertson, who was making a version of his RXB
  493.         product for the AMS card.  Rich filled in the gaps, telling me
  494.         that the printed docs were wrong and the AMSINI file correct.
  495.         He pointed out all the non-obvious things, like the fact that in
  496.         its power-up condition certain pages of the AMS are pre-assigned
  497.         to the low and high portions of 32K memory.  Pages 2 and 3 are
  498.         the low memory, and pages 10 (>A) through 15 (>F) are assigned
  499.         as the high memory.  In other words, if your program loads in
  500.         low memory, it will reside in pages 2 and 3 of the AMS, and if
  501.         it writes to or reads from high memory, that will go into and
  502.         come from pages >A through >F of the AMS.  (One page is 4K of
  503.         memory.  Pages >A through >F will hold 24K bytes.)
  504.  
  505.              Among other things, this means that pages 0 and 1 and the
  506.         group of pages from 4 through 9 are unused in the power-up
  507.         configuration.  Pages beyond 16 (>10) are also unfilled on
  508.         power-up.  Some programmers (including Rich Gilbertson) prefer
  509.         to leave pages below 16 (>10) unused, reserving them for future
  510.         use with an alternate operating system.  Being an old curmudgeon
  511.         who doesn't believe any such operating system will ever emerge,
  512.         I decided that pages below 16 would not be left alone by my
  513.         Video Titler program.
  514.  
  515.              But first, since AMS cards come in various configurations,
  516.         with capacities of 128K, 256K, and even 512K, I had to have a
  517.         way for my program to measure the amount of memory that was
  518.         present, and adapt its operation accordingly.  Fortunately, that
  519.         AMSINI file on the disk contained just such a program segment.
  520.         I adapted that slightly, so it would measure page by page
  521.         starting at 16 and going to whatever was the highest page
  522.         available.  Since pictures occupy three pages each, I divide the
  523.         number found by three to find the number of "frames" that can be
  524.         stored in the memory above page 15.  In the Video Titler case,
  525.         we can use pages 10 thru 15 to store two more frames, since the
  526.         entire program remains in low memory, pages 2 and 3.  Now let's
  527.         suppose we've got a card with only 128K memory.  There will be
  528.         only 16 pages above 15, and using them in groups of 3 will mean
  529.         only 5 frames there.  Adding the two frames in pages 10 thru 15
  530.         means seven frames can be stored.  If we use that unused space
  531.         from page 4 thru 9, two more frames can be stowed, for a total
  532.         of nine.  Thus in the program we take the number of pages beyond
  533.         15, divide that by three (ignoring any remainder) and add 4 to
  534.         come up with the total number of frames we can keep in memory.
  535.         For Lew King's card, with 256K capacity, there are 48 pages past
  536.         15, so a total of 20 frames can be stored.  For 512K capacity, a
  537.         whopping 41 frames could be put into memory.
  538.  
  539.              In the sidebar for this article are a couple of "snippets"
  540.         of source code that may be helpful to anyone trying to make use
  541.         of the AMS card for data-intensive applications.  First in that
  542.         is a "complete program" section called AMST.  This was the first
  543.         thing I sent to Lew King for testing.  This little program, if
  544.         run on my own machine, which has no AMS card, will simply report
  545.         that fact.  On Lew's machine, it reports 48 Pages and 20 Frames
  546.         as the capacity of his AMS card.
  547.  
  548.              This source can be modified easily to report in different
  549.         ways.  For example, you could take the number of pages above 15,
  550.         add 12 for the pages from 4 thru 15, then multiply by 4 to
  551.         indicate available capacity in KiloBytes.
  552.  
  553.                                  ACCESS and MAPPING
  554.  
  555.              To use other than the default setup, you have to do two
  556.         things.  First, you have to "turn on" the card's memory in the
  557.         >4000 block and write to the mapping registers there.  Second,
  558.         you have to "turn on" the mapper function to make what you've
  559.         written into the >4000 block take effect.  The first step in all
  560.         this is to set Register 12 to the value >1E00, which is the CRU
  561.         address of the AMS card.  Now doing a SBO 0 instruction will
  562.         enable the >4000 memory block for reading and writing.  In that
  563.         block, each word starting with >4000 and ending with >401E acts
  564.         to control what page maps into what memory location.  The
  565.         subroutine AMSINI (see sidebar) initializes all the mapping
  566.         registers to power-up condition.  Thus, for example, >4004 is
  567.         set for page 2, >4006 to page 3, etc.  In our own program, we're
  568.         mapping things into the >A000 through >F000 blocks.  Thus the
  569.         registers we write to in >4000 are at >4014 thru >401E.  To make
  570.         a mapping selection, we write the desired page number to the
  571.         high order byte of the control register.  Let's take a concrete
  572.         example.  Suppose we want pages 4, 5 and 6 of the AMS to behave
  573.         as if they were at >A000, >B000, and >C000.  It's this easy:
  574.  
  575.                   LI  R12,>1E00 CRU ADDRESS
  576.                   SBO 0         TURN ON CARD'S >4000 BLOCK
  577.                   LI  R1,>0400  PAGE NUMBER IN LEFT BYTE
  578.                   LI  R3,>4014  MAPPING REGISTER FOR >A000 BLOCK
  579.                   MOV R1,*R3+   WRITE TO >4014 AND ADD 2 TO R3
  580.                   AI  R1,>100   LEFT BYTE OF R1=5
  581.                   MOV R1,*R3+   WRITE 5 TO >4016 AND ADD 2 TO R3
  582.                   AI  R1,>100   LEFT BYTE OF R1=6
  583.                   MOV R1,*R3    WRITE 6 TO LEFT BYTE AT >4018
  584.  
  585.              This sets the registers, but does not actually start the
  586.         mapper working.  To put the mapping in effect, we have to
  587.         perform one more operation:
  588.  
  589.                   SBO 1          TURN ON THE MAPPER
  590.  
  591.              Now that the mapper is turned on, anything written to >A000
  592.         thru >CFFF will actually be written into pages 4 thru 6 of the
  593.         AMS memory instead of into pages >A thru >C.  Similarly, any
  594.         memory reading from >A000 thru >CFFF will actually read the
  595.         contents of pages 4 thru 6 of the AMS memory.  Thus your program
  596.         can write and read as if to >A000 thru >CFFF, but the mapper
  597.         will make things actually access the pages 4 thru 6 in the AMS
  598.         card.  You can turn off access to the card's >4000 block and
  599.         still leave the mapper in effect by the instruction SBZ 0.
  600.         (Provided R12 still contains >1E00.)  You can turn off the
  601.         mapper by SBZ 1, and then the areas >A000 thru >CFFF will revert
  602.         to "normal", reading and writing to pages >A thru >C of the AMS
  603.         card.
  604.  
  605.              In the finished AMS version of Video Titler, the program
  606.         works by frames, where each frame accounts for three pages of
  607.         the AMS memory.  We use an odd-even scheme, so that odd numbered
  608.         frames (1,3,5,...19) go into pages mapped to >A000 thru >CFFF,
  609.         and even numbered ones go into pages mapped to >D000 thru >FFFF.
  610.         This way the program always has immediate access to two frames
  611.         at any given time.  Let's say for example that the user asks to
  612.         load a TI-Artist picture (with color) into Frame 1.  We take the
  613.         desired frame number, multiply that by three, add one, then put
  614.         that in the left byte of a workspace register.  Since this is an
  615.         odd frame, we use the mapping registers at >4014 thru >4018, and
  616.         put 4, 5, and 6 into the left bytes of those mapping registers,
  617.         respectively.  (For an even page, we'd use >401A thru >401E.)
  618.         Now when the program reads the file, it dumps the contents of
  619.         the pattern and color parts into >A000 thru >CFFF, which really
  620.         goes into pages 4 thru 6 of the AMS memory.  In similar fashion,
  621.         frame 2 goes into pages 7 thru 9, frame 3 into pages 10 thru 12,
  622.         frame 4 goes to pages 13 thru 15, and so on until frame 20,
  623.         which goes into pages 61 thru 63.  Clear as mud?  Look at Part
  624.         Two of the Sidebar, which may help.  Meanwhile, how about a
  625.         little different perspective?
  626.  
  627.                            The AMS Owner's Viewpoint
  628.  
  629.              The Super AMS card is a most welcome and needed addition to
  630.         the TI 99/4A.  The physical aspects are a well-made, high-quality
  631.         card which inserts in place of the 32K card.  In normal use, it
  632.         duplicates the 32K card exactly, except for the absence of an
  633.         indicator light.  In expanded mode, the card provides from 128K
  634.         to 1 meg of paged memory, depending on the chips installed.
  635.  
  636.              There are three disks of software provided with the card,
  637.         of which two are archived.  Included is an excellent memory
  638.         tester that writes and reads to every bit.  This assures the
  639.         user that everything is functioning properly.  Also included is
  640.         an excellent disk copy program, AMS Copy.  The program reads an
  641.         entire 720 sector disk into memory, then writes to the copy disk
  642.         in one pass.  Contents of the master disk remain in memory,
  643.         allowing as many copies to be made as needed without re-reading.
  644.         Also there were two games, which I could not get to run.  The
  645.         remainder of the software is mainly for programmers and of
  646.         little consequence for the end user.  So, aside from testing the
  647.         memory and copying disks, what can be done with the Super AMS
  648.         card? Well, prior to the middle of July, the answer was "not too
  649.         much."
  650.              Enter Bruce Harrison.  When I first purchased the Super AMS
  651.         card back in May at Cleveland, Bruce rather poo-pooed it,
  652.         saying that he could write any program for the TI and keep it
  653.         well within the 32K space.  No argument here.  Then I posed the
  654.         hypothetical question....how many titles could the Video Titler
  655.         program hold in 256K of memory?  To which Bruce answered, "I'll
  656.         think about it."
  657.  
  658.              Well, Bruce did a lot of thinking and a lot of programming.
  659.         The result.... the Video Titler can now hold up to twenty color
  660.         graphic files in memory on a 256K card.  Super.  They are
  661.         instantly available using any of the many different wipes in the
  662.         program.  If you make a mistake, or change your mind, any frame
  663.         can be reloaded without changing the others.  The sequence can
  664.         also be started at any frame.  Anyone who has previously used
  665.         the Video Titler will most certainly appreciate the new
  666.         features, added versatility, speed, and power of the new AMS
  667.         Video Titler.  The entire operation of paging twenty titles into
  668.         memory, then using them is totally seamless and transparent to
  669.         the user.  It is as though the TMS9900 had twenty address lines.
  670.         Substantial documentation is included with the program, but I
  671.         dare say that most folks won't read them.  Aside from possibly
  672.         looking up which keys to use for what wipes, the Titler is that
  673.         easy to use.  When you are ready to quit, the Titler returns
  674.         nicely to the E/A menu screen.
  675.  
  676.              It's rather ironic....  To the best of my knowledge, Bruce
  677.         Harrison is the first programmer outside of the SAMS development
  678.         team to make any real productive software for the Super AMS
  679.         card.  Yet, he is the one programmer that never received a card
  680.         to use.  The AMS Video Titler beta copy worked flawlessly the
  681.         very first time.  This is a real tribute to outstanding
  682.         programming ability.
  683.  
  684.                             Programmer's Update
  685.  
  686.              Since the above was written, I have received a set of the
  687.         AMS documentation and an offer of a card from David Ormand of
  688.         the SW99ers.  David has been sent a copy of the AMS Video Titler
  689.         and a letter accepting the offer of a card to use for
  690.         programming and testing my new products designed for use with
  691.         AMS.
  692.  
  693. * SIDEBAR PART ONE - A TEST PROGRAM
  694. * COMPLETE AS SHOWN
  695. *
  696. * TEST PROGRAM FOR AMS CARD
  697. * SPECIAL BY B. HARRISON
  698. * FOR TITLER AMS VERSION
  699. * AMST/S
  700.        REF  KSCAN,VMBW
  701.        DEF  START
  702. KEYADR EQU  >8374        Key-unit address
  703. KEYVAL EQU  >8375        Reported keystroke
  704. STATUS EQU  >837C        GPL STATUS BYTE
  705. GPLWS  EQU  >83E0        GPL workspace
  706. GR4    EQU  GPLWS+8      GPL Reg 4
  707. GR6    EQU  GPLWS+12     GPL Reg 6
  708. STKPNT EQU  >8373        stack pointer
  709. LDGADD EQU  >60          load grom address address
  710. XTAB27 EQU  >200E        a storage location
  711. GETSTK EQU  >166C        get stack
  712.  
  713. START  LWPI WS           LOAD OUR WORKSPACE
  714.        BL   @AMSINI      USE AMS INITIALIZE SUBROUTINE (BELOW)
  715.        C    R1,@>401E    AMS CARD PRESENT? 0=NO 401E=0F0F=YES
  716.        JNE  NOAMS        IF NO AMS CARD, JUMP AHEAD
  717.        SBO  1            TURN ON MAPPER
  718.        CLR  R1           R1=0
  719.        CLR  R4           R4=0
  720.        MOV  R1,@>401E    SET >F000 TO PAGE >00
  721.        MOV  R1,@>F000    SET FIRST WORD PAGE 0 TO 0
  722.        LI   R3,>8000     R3 TO PAGE >80
  723.        MOV  R3,@>401A    SET >D000 TO PAGE >80
  724.        LI   R1,>0F00     START AT PAGE 15
  725. AMSLP1 AI   R1,>100      ADD ONE PAGE
  726.        INC  R4           INC NUMBER FOUND
  727.        MOV  R1,@>401C    SET >E000 TO PAGE 16, 17, 18, ETC.
  728.        MOV  R1,@>E000    LOAD >E000 WITH PAGE #
  729.        C    R1,@>E000    DID IT LOAD?
  730.        JNE  AMSDO        IF NOT, WE'RE BEYOND LAST PAGE
  731.        C    @>F000,@>E000     CHECK PAGE 0 FOR CHANGE
  732.        JEQ  AMSDO        IF EQUAL, JUMP
  733.        CI   R1,>9000     LIMIT NUMBER?
  734.        JL   AMSLP1       IF LESS, REPEAT
  735.        C    @>D000,@>E000     CHECK PAGE 80 FOR CHANGE
  736.        JNE  AMSLP1       IF NOT EQUAL, REPEAT
  737. AMSDO  DEC  R4           ONE LESS (R4 EQUALLED PAGE NOT FOUND)
  738.        MOV  R4,@AMS      SAVE NUMBER OF PAGES ABOVE 15
  739.        BL   @AMSINI      AMS INITIALIZE (BACK TO "NORMAL")
  740.        SBZ  0            TURN OFF CARD - MAPPER STILL ON
  741.        SBZ  1            TURN OFF MAPPER
  742.        JMP  REPORT       JUMP TO REPORT SECTION
  743. NOAMS  LI   R0,11*32+3   ROW 12, COL 4
  744.        LI   R1,NOSTR     NO AMS MESSAGE
  745.        BL   @DISSTR      DISPLAY THAT
  746.        JMP  KEYEX        JUMP TO EXIT ROUTINE
  747. REPORT LI   R0,10*32+3   ROW 11, COL 4
  748.        LI   R1,PGSTR     PAGES STRING
  749.        BL   @DISSTR      DISPLAY THAT
  750.        A    R2,R0        ADD LENGTH TO POINTER
  751.        MOV  @AMS,R3      GET NUMBER OF PAGES PAST 15
  752.        MOV  R3,@>835E    PUT AT >835E
  753.        BL   @SHWINT      SHOW NUMBER ON SCREEN
  754.        LI   R0,12*32+3   ROW 13, COL 4
  755.        LI   R1,FRMSTR    FRAMES STRING
  756.        BL   @DISSTR      SHOW THAT
  757.        A    R2,R0        ADD LENGTH
  758.        CLR  R2           CLEAR R2
  759.        LI   R1,3         SET R1 TO 3
  760.        DIV  R1,R2        DIVIDE R2-R3 BY 3
  761.        AI   R2,4         ADD 4 FOR PAGES 4 THRU 15
  762.        MOV  R2,@>835E    QUOTIENT PLUS 4 (FRAMES) TO >835E
  763.        BL   @SHWINT      SHOW THAT NUMBER (1/3 OF PAGES NUM + 4= FRAMES)
  764. KEYEX  BLWP @KSCAN       SCAN KEYBOARD
  765.        LIMI 2            ALLOW INTS
  766.        LIMI 0            STOP INTS
  767.        CB   @ANYKEY,@STATUS KEY STRUCK?
  768.        JNE  KEYEX        IF NOT, REPEAT
  769.        LWPI GPLWS        LOAD GPL WORKSPACE
  770.        B    @>6A         BACK TO GPL INTERPRETER
  771. *
  772. * SUBROUTINES SECTION
  773. *
  774. * AMSINI SETS AMS CARD TO "POWER-UP" CONDITION
  775. *
  776. AMSINI LI   R12,>1E00    AMS CRU BASE
  777.        SBO  0            TURN ON AMS
  778.        LI   R1,>FEFF     (THIS IS ->0101)
  779.        LI   R0,>4000     START OF MEMORY
  780. AMSLP  AI   R1,>0101     ADD 1 PAGE
  781.        MOV  R1,*R0+      MOVE 2 BYTES TO MEM-MAPPER
  782.        CI   R0,>4020     ALL DONE?
  783.        JLT  AMSLP        NO, INIT MORE
  784.        RT                RETURN
  785. *
  786. * DISSTR DISPLAYS STRING POINTED BY R1 AT SCREEN
  787. * LOCATION POINTED TO BY R0
  788. *
  789. DISSTR MOVB *R1+,R2      LENGTH BYTE TO R2
  790.        JEQ  DISX         IF ZERO, SKIPIT
  791.        SRL  R2,8         RT JUST
  792.        BLWP @VMBW        WRITE STRING TO SCREEN
  793.        A    R2,R1        ADD LENGTH TO POINTER
  794. DISX   RT
  795. *
  796. * FOR SHWINT, FIRST PUT INTEGER AT >835E,
  797. * AND POINT R0 AT DESIRED LOCATION
  798. * THEN BL  @SHWINT
  799. *
  800. SHWINT BLWP @GPLLNK      USE GPLLNK VECTOR
  801.        DATA >2F7C        DATA FOR INT TO STRING
  802.        MOVB @>8361,R2    LENGTH TO R2
  803.        SRL  R2,8         RT JUST.
  804.        MOVB @>8367,R1    ADDR TO R1
  805.        SRL  R1,8         RT JUST
  806.        AI   R1,>8300     ADD OFFSET
  807.        BLWP @VMBW        WRITE STRING
  808.        RT
  809. *  GENERAL PURPOSE GPL LINK
  810. *  by Doug Warren/Craig Miller
  811. *
  812. GPLLNK DATA GLNKWS
  813.        DATA GLINK1
  814. RTNAD  DATA XMLRTN
  815. GXMLAD DATA >176C
  816.        DATA >50
  817. GLNKWS EQU  $->18
  818.        BSS  >08
  819. GLINK1 MOV  *R11,@GR4
  820.        MOV  *R14+,@GR6
  821.        MOV  @XTAB27,R12
  822.        MOV  R9,@XTAB27
  823.        LWPI GPLWS
  824.        BL   *R4
  825.        MOV  @GXMLAD,@>8302(R4)
  826.        INCT @STKPNT
  827.        B    @LDGADD
  828. XMLRTN MOV  @GETSTK,R4
  829.        BL   *R4
  830.        LWPI GLNKWS
  831.        MOV  R12,@XTAB27
  832.        RTWP
  833. *
  834. * DATA SECTION
  835. *
  836. WS     BSS  32           OUR REGISTERS
  837. AMS    DATA 0            PAGES BEYOND 15
  838. NOSTR  BYTE 19
  839.        TEXT 'NO AMS CARD PRESENT'
  840. PGSTR  BYTE 14
  841.        TEXT 'PAGES FOUND = '
  842. FRMSTR BYTE 9
  843.        TEXT 'FRAMES = '
  844. ANYKEY BYTE >20
  845.        END
  846. *
  847. * END OF COMPLETE PROGRAM
  848. *
  849. * PART TWO OF SIDEBAR - A "SNIPPET"
  850. *
  851. * SUBROUTINE SETFRM (FROM AMS VIDEO TITLER)
  852. * ON ENTRY, R3 CONTAINS THE CURRENT FRAME NUMBER (1 THRU XX)
  853. * WHERE XX CAN BE 9 (128K CARD), 20 (256K CARD), OR 41 (512K CARD)
  854. * PAGE NUMBERS START WITH 0, SO FOR EXAMPLE ON A 256K CARD, PAGES
  855. * ARE NUMBERS 0 THRU 63, FOR A TOTAL OF 64 PAGES
  856. *
  857. * THE PROGRAM "KNOWS" HOW MANY FRAMES ARE AVAILABLE, AND
  858. * WON'T USE THIS SUBROUTINE BEYOND THE AVAILABLE FRAMES.
  859. *
  860. SETFRM MOV  R3,R1        COPY CURRENT FRAME # TO R1
  861.        MPY  @THREE,R3    MULTIPLY R3 BY 3
  862.        INC  R4           ADD 1 TO PRODUCT IN R4 (PAGE NUMBER ON AMS = 4 THRU YY)
  863. * YY IS THE HIGHEST PAGE -2
  864.        SWPB R4           SWAP TO LEFT BYTE
  865.        COC  @ONEWD,R1    CHECK CURRENT FRAME FOR ODD/EVEN
  866.        JNE  SETEVN       IF NOT 1 IN LSB, EVEN
  867. SETODD LI   R8,>4014     MAP FOR >A000
  868.        LI   R1,>A000     SET R1=>A000
  869.        JMP  SETPGS       JUMP
  870. SETEVN LI   R8,>401A     MAP FOR >D000
  871.        LI   R1,>D000     SET R1=>D000
  872. SETPGS LI   R12,>1E00    AMS CRU ADDR
  873.        SBO  0            TURN ON CARD
  874.        SBO  1            TURN ON MAPPER
  875.        LI   R5,3         THREE WRITES TO MAKE (3 PAGES PER FRAME)
  876. SETLP  MOV  R4,*R8+      SET CURRENT PAGE AND INCT R8
  877.        AI   R4,>100      NEXT PAGE
  878.        DEC  R5           DEC COUNT
  879.        JNE  SETLP        RPT IF NOT 0
  880.        SBZ  0            TURN OFF CARD MEMORY (>4000)
  881. * THE MAPPER STAYS ON
  882.        RT                RETURN
  883. * UPON RETURN, R1 IS USED TO DETERMINE WHERE THE FRAME IS SENT OR GOTTEN FROM
  884. * DEPENDING WHETHER WE'RE WRITING OR READING A FRAME
  885. *
  886. * END OF PART 2 OF SIDEBAR
  887.  
  888. ============================================================================
  889. DTIHM005
  890.  
  891. Corcomp Memory Expansion Unit.
  892.  
  893. This device uses a TMS4500 for Memory Refresh.  (There is no 9901 on the
  894. card as a previous version of this documented stated.)
  895.  
  896. CRU Bit         Purpose
  897.    0            DSR Rom Enable
  898.    1            Ram Disable
  899.    2            Bank 0
  900.    3            Second 256K
  901.    4            Rom Page
  902.    6            Bank 1 \
  903.   10            Bank 2  \
  904.   14            Bank 3    \  Pages
  905.   18            Bank 4    /
  906.   22            Bank 5   /
  907.   26            Bank 6  /
  908.   30            Bank 7 /
  909.   32            Reset=1
  910.  
  911. Each bank fills the entire 32K area (>2000-3FFF,>A000-FFFF).  Only one of
  912. the CRU bank bits should be active (=1) at any given time.  CRU bit 1 will
  913. disable all the RAM on the memory card.  By disabling the RAM, Corcomp was
  914. able to support a second memory card.
  915.  
  916. The design of the Corcomp memory prevents most track copiers from working.
  917. This is undoubtedly because the Corcomp memory affects the bus timing.
  918.  
  919. ==========================================================================
  920. DTIHM006
  921.  
  922. WHT Keyboard Interface
  923.  
  924. Specifications for TI 99/4a AT Keyboard interface and ROM upgrade
  925. Copyright 1993-96 Western Horizon Technologies
  926.  
  927. CRU DEFINITIONS:
  928.  
  929. CRU Base:       >0400
  930.  
  931. System Occupies >0000 to >03FF due to partial decode of 9901.
  932.  
  933. Output Bits:
  934.  
  935. 0       1=Turn On 8251A USART at base address >4000
  936. 1       1=Disable ROM/RAM on card, 0=ENABLE (enabled at power up)
  937. 2       1=RAM in >0000 to >2000 space, 0=EPROM (EPROM on power up)
  938. 3       spare - NOT Connected
  939. 4       Enable 8251A character in receive buffer interrupt to system
  940. 5       8251A RESET
  941. 6       1=Set system RESET line*
  942.         (Causes a hardware reset to occur, should be activated by a
  943.          CTL-ALT-DEL)
  944. 7       1=Cause a NMI*
  945.         (LOAD Interrupt, should be activated by a SHIFT-PRINT SCREEN)
  946. 8       EPROM Extended address bit 0 (LSB)
  947. 9       EPROM Extended address bit 1
  948. 10      EPROM Extended address bit 2 (MSB)
  949. 11      EPROM Extended address bit 3 (Spare)
  950. 12      SRAM Extended address bit 0 (LSB)
  951. 13      SRAM Extended address bit 1
  952. 14      SRAM Extended address bit 2 (MSB)
  953. 15      SRAM Extended address bit 3 (Spare)
  954.  
  955. Input Bits:
  956.  
  957. Bit 0-3 Dip Switch Positions 1-4                If switch is OFF, Bit=1
  958. Bit 4   8251A Sync/Break detect
  959. Bit 5   8251A Transmitter ready, 8251A is ready to accept data
  960. Bit 6   8251A Transmitter empty, 8251A Has sent data if=1
  961. Bit 7   Character in 8251A receive buffer
  962.  
  963. REGISTER DEFINITIONS:
  964.  
  965. Registers at >4000 and >4002 only available when CRU BIT 0 is TRUE
  966.  
  967. Registers at >8000 and >8002 are always available.
  968.      This is the location of the memory mapper registers
  969.        on the Myarc Geneve 9640.
  970.  
  971. Registers are only partially decoded to a 128 word block.
  972.       They physically occupy the >4000->4100 and >8000->8100 areas.
  973.  
  974. PAD RAM begins at >8300
  975.  
  976. Read Registers
  977.  
  978. >4000
  979.   OR    8251A Data from serial bus
  980. >8000
  981.  
  982. >4002
  983.   OR    8251A Status Register
  984. >8002
  985.  
  986. Write Registers
  987.  
  988. >4000
  989.   OR    8251A Send data
  990. >8000
  991.  
  992. >4002
  993.   OR    8251A Control Register
  994. >8002
  995.  
  996. * Not supported on initial board revision
  997.  
  998. ===========================================================================
  999. DTIHM007
  1000.  
  1001. More on the WHT Keyboard Interface:
  1002.  
  1003. I can get you the information on accessing the memory in the WHT keyboard.
  1004. It is all done with CRU instructions.
  1005.  
  1006. The base CRU address for the AT keyboard interface is located at >400.
  1007. The memory is banked in at addresses 0000-1FFF (8K) and replaces
  1008. the console ROM.
  1009.  
  1010. You can swap between EPROM and optional RAM on the interface by setting
  1011. bit 2.  Setting this bit to 0 selects the EPROM.  Setting this bit to
  1012. 1 selects the optional RAM.
  1013.  
  1014. There are 8 banks of ROM and 8 banks of RAM.  The bank selection is
  1015. controlled by bits 12-15 for RAM and 8-11 for ROM.  You may notice that
  1016. there are more bits than are needed to select 8 banks.  Don O'Neil left
  1017. room for future expansion to double the amount of memory on the card.
  1018.  
  1019. Anyway, lets say you want to select bank 2 of the RAM.  Your code
  1020. would look something like this -
  1021.  
  1022.        LI   R12,>400
  1023.        SBZ  2           Turn on the RAM
  1024.        LI   R12,>400+24
  1025.        LI   R1,>0200    Select RAM bank
  1026.        LDCR R1,4
  1027.  
  1028. When you are done, you want to enable bank 0 of the EPROM again
  1029.  
  1030.        LI   R12,>400
  1031.        SBO  2           Turn on EPROM
  1032.        LI   R12,>400+16
  1033.        CLR  R1          Select ROM bank 0
  1034.        LDCR R1,4
  1035. --
  1036. David Nieters                    Dave.Nieters@dtc.fingerhut.com
  1037. Fingerhut Companies
  1038.  
  1039. ==============================================================================
  1040. DTIHM008
  1041.  
  1042. Using the MBP
  1043.  
  1044. This MBP is a memory mapped device. It maps into the 1K Block that is reserved
  1045. for sound >8400->87FF. It uses National Semiconductor ADC&Real Time clock.
  1046.  
  1047. ONLY EVEN NUMBERED ADDRESSES ARE USED!!
  1048.  
  1049. The clock and date Function.
  1050.  
  1051. Basic Address   Assembler EQU           Definition
  1052. -31168          >8640                   Thousands Sec
  1053. -   66          >8642                   Tens & Hund Sec.
  1054. -   64          >8644                   Seconds
  1055. -   62          >8646                   Minutes
  1056. -   60          >8648                   Hours
  1057. -   58          >864A                   Day of Week
  1058. -   56          >864C                   Date
  1059. -   54          >864E                   Month
  1060.  
  1061. With a Geneve in GPL mode you can access the clock and date function at the
  1062. same addresses.  In either GPL or MDOS mode, you can map physical page >BC
  1063. to any logical page and access the clock and date function at offset >0640
  1064. in the 8K page.
  1065.  
  1066. ==============================================================================
  1067. DTIHM009
  1068.  
  1069. Super Cartridge:
  1070.  
  1071. This was the name of the orginal project published in Micropendium. It consisted
  1072. of an E/A module, modified to add 8K of ram to the cartridge port - this RAM was
  1073. backed up. In addition to giving programmers 8K of additional RAM for assembly
  1074. code, for the first time programmers could actually create their own cartridges
  1075. - so that with the cartridge inserted and the machine powered on, their software
  1076. would now appear as a menu option under 1. Basic.
  1077.  
  1078. Here is a snippet of code by David R. Romer from his July '85 article in
  1079. Micropendium.
  1080.  
  1081. ***************************
  1082. * Super Cart Test Program *
  1083. ***************************
  1084.         DEF     TEST            Define label TEST as program name
  1085.         AORG    >6000           absolute code starting at >6000
  1086.         DATA    >AA01           start of CARTRIDGE HEADER, value >AA01
  1087.         DATA    >0              must be at address >6000
  1088.         DATA    >0
  1089.         DATA    >MNULNK         pointer to first menu table entry
  1090.         DATA    >0
  1091.         DATA    >0
  1092. MNULNK  DATA    >0              2st menu table entry, DATA 0=single entry.
  1093.         DATA    ENTRY           pointer to start of program
  1094.         BYTE    >09             length of text to be displayed on menu scrn
  1095.         TEXT    'MENU TEST'     actual menu text to be displayed
  1096. ENTRY   B       @TEST           branch to start of program
  1097. ****************************
  1098. WS      BSS     32
  1099. MASK    DATA    >4000
  1100. MSG     TEXT    'MENU TEST PROGRAM'
  1101. TEST    LWPI    WS
  1102.         LI      R0,263          scrn location for display
  1103.         LI      R1,MSG          pointer to text to be displayed
  1104.         LI      R2,17           length of text
  1105.         BL      @VMBW
  1106. *****************************
  1107.         LI      R1,>0A          delay loop while text is on screen
  1108. LOOP    LI      R0,>FFFF
  1109. LOOP1   DEC     R0
  1110.         JNE     LOOP1
  1111.         DEC     R1
  1112.         JNE     LOOP
  1113. *****************************
  1114.         LWPI    >83E0           load GPL workspace
  1115.         BLWP    @>0000          brach to color bar screen
  1116. *****************************
  1117. VMBW    SOC     @MASK,R0        stand alone VDP multiple byte write routine
  1118.         SWPB    R0
  1119.         MOVB    R0,@>8C02
  1120.         SWPB    R0
  1121.         MOVB    R0,@>8C02
  1122.         NOP
  1123. WLP     MOVB    *R1+,@>8C00
  1124.         DEC     R2
  1125.         JNE     WLP
  1126.         B       *R11
  1127.         END
  1128.  
  1129. ==========================================================================
  1130. DTIHM010
  1131.  
  1132.  
  1133. DataBioTics Super Space II.
  1134.  
  1135. The Super Space II takes the design of the orginal Super Cart much further by
  1136. giving the program 32K that can be banked in 8K pages at the >6000 address
  1137. space.
  1138.  
  1139. I have a DataBioTics Super Space II!  Two, actually!  Love 'em!
  1140.  
  1141. Banks are selected by writing a bit pattern to CRU address >0800:
  1142.  
  1143.    Bank #   Value
  1144.      0        2
  1145.      1        8
  1146.      2      >20
  1147.      3      >80
  1148.  
  1149. I don't know why this has to be a 16-bit transfer, but that's what
  1150. the books says.  The example is the following subroutine, with
  1151. the bank number (0, 1, 2, or 3) in R0:
  1152.  
  1153. BNKSW  LI    R12,>0800   Set CRU address
  1154.        LI    R1,2        Load Shift Bit
  1155.        SLA   R0,1        Align Bank Number
  1156.        JEQ   BNKS1       Skip shift if Bank 0
  1157.        SLA   R1,0        Align Shift Bit
  1158. BNKS1  LDCR  R1,0        Switch Banks
  1159.        SRL   R0,1        Restore Bank Number (optional)
  1160.        RT
  1161.  
  1162. (I'm not sure they're quite correct.  I thought you couldn't
  1163. shift R0!)
  1164.  
  1165. But there you go!
  1166.  
  1167. Regards,
  1168.  
  1169. --
  1170. *** David Ormand ************ Southwest 99ers ***
  1171. *** dlormand@aztec.asu.edu ** Tucson, Arizona ***
  1172. ***************************** TMS9900 Lives! ****
  1173.  
  1174.  
  1175.  
  1176. ============================================================================-
  1177. DTIHM011
  1178.  
  1179. 33210 17JUL92-1918 General Information
  1180.      RE: TI CPU bug??? (Re: Msg 33209)
  1181.      From: JHWHITE      To: JPLESLIE
  1182.  
  1183. David:  The DECrement instruction actually adds ">FFFF" to the value being
  1184. decremented.  The carry is set whenever the resulting value would be greater
  1185. than >FFFF.  The only time the resulting value is not greater than >FFFF is
  1186. when the value being decremented is >0000.  Some bitwise arithmetic shows what
  1187. happens:
  1188.  
  1189.  
  1190.  DEC >8000 = b1000 0000 0000 0000
  1191.            + b1111 1111 1111 1111 = >FFFF
  1192.              --------------------
  1193.         C=1  b0111 1111 1111 1111 = >7FFF
  1194.  
  1195.  DEC >FFFF = b1111 1111 1111 1111
  1196.            + b1111 1111 1111 1111 = >FFFF
  1197.              --------------------
  1198.         C=1  b1111 1111 1111 1110 = >FFFE
  1199.  
  1200.  DEC >0000 = b0000 0000 0000 0000
  1201.            + b1111 1111 1111 1111 = >FFFF
  1202.              --------------------
  1203.         C=0  b1111 1111 1111 1111 = >FFFF
  1204.  
  1205. Adding >FFFF, which can be thought of as -1 in two-complement form, is what
  1206. the 9900 does when it DECrements.
  1207.  
  1208. Jeff White
  1209.  
  1210. p.s.: That rule for carry does not mean when the value of bit 0 changes, but
  1211. when the addition of >FFFF to the value results in a carry value of 1 out of
  1212. bit 0.  If the value in bit 0 changing caused a status bit to change, it would
  1213. be the OVerflow bit, not the carry bit.
  1214.  
  1215. -*-
  1216.  
  1217. =============================================================================
  1218. DTIHM012
  1219.  
  1220. 35301 22OCT92-0313 TI ECHO
  1221.      RE: clock speed? (Re: Msg 35287)
  1222.      From: JHWHITE      To: ILLUSIONIST
  1223.  
  1224. The 99/4A runs at 3 MHz with 8192 bytes ROM and 256 bytes RAM at 0 wait state,
  1225. and the rest of memory or memory-mapped devices at 4 wait states.  At 0 wait
  1226. state, a full (16-bit) word is moved across the CPU data bus in two clock
  1227. cycles, which makes a theoretical maximum through-put of 1.5 Mwords/sec.
  1228. Of course, with 4 wait state memory, that takes the theoretical maximum
  1229. through-put down to 0.5 Mwords/sec.
  1230.  
  1231. Then take into account that the 9900 bus is only active about 25% of the
  1232. time (because it is not pipelined like the 9995 or 99000).
  1233.  
  1234. Jeff White
  1235.  
  1236. -*-
  1237. =============================================================================
  1238. DTIHM013
  1239.  
  1240.   What's wrong with the TI-99/4(a)?
  1241.    
  1242.   It can be summed up in four words - "ninety-nine eighty five."
  1243.    
  1244.   No, this is not the price your local discount store "blew" them out
  1245.   at in 1984.....or maybe it was,  but. I am referring to the TMS9985.
  1246.   This was the CPU that TI originally planned to have in the 99/4.
  1247.  
  1248.   Due to technical difficulties, the TMS9985 was never produced. That
  1249.   forced TI to use the more expensive 9900 in the 99/4, instead of the
  1250.   less expensive 9985.
  1251.    
  1252.   The TMS9985 is the father of the 9995, just as the 99000 is the
  1253.   son of the 9900. Let's review some of the highlights of the 9995.
  1254.    
  1255.     o Has an onboard cache of 256 bytes.
  1256.     o Has an 8-bit data bus.
  1257.     o Utilizes only one dedicated external interrupt level besides Reset.
  1258.    
  1259.   These are all "features" that the 9995 and 9985 share.
  1260.    
  1261.   Highlights of the 9900.
  1262.    
  1263.     o Has a 16-bit data bus to all memory.
  1264.     o Has 15 external prioritized interrupts levels besides Reset.
  1265.    
  1266.   Now, let's say for a minute you had a system designed for a TMS9985
  1267.   but you where suddenly forced to use a 9900. Most of us would go back 
  1268.   to the drawing board and create a vastly more powerful computer, but
  1269.   the engineers at TI were under presure to get something done quickly 
  1270.   with out re-engineering the entire computer system....
  1271.  
  1272.   What would you do?
  1273.    
  1274.     o Tie interrupt pins such that only one external interrupt level was possible.
  1275.     o You would probably implement the 256 bytes of onboard ram as
  1276.       256 bytes of static ram on the 16-bit bus to
  1277.       simulate the on board cache, but would leave the
  1278.       rest of the system access as 8-bit reads ( done twice ).
  1279.    
  1280.   Does all of this sound familiar?
  1281.    
  1282.   These considerations have had one major impact. If TI had implemented the
  1283.   9900 like it had been designed, anyone building a 4(a) compatible
  1284.   would have been forced to use the 99000 as an upgrade processor.
  1285.   
  1286.   Had to redesign the 99/4(a) to utilize the 9900 to it full capabilities,  
  1287.   we would have had a vastly superior computer. Minicomputer class 
  1288.   capabilities!
  1289.  
  1290.   While you can cripple a 9900 or a 99000 to act like a 9985 or 9995, you
  1291.   can not make the reverse happen.....
  1292.    
  1293.    The End
  1294.   
  1295. L.D.O.M. 12.6.96
  1296. ===========================================================================
  1297. DTIHM014
  1298.  
  1299. Highlights of the 99105A
  1300. By Dan H. Eicher
  1301.  
  1302. As you all know the 99/4(A) uses the 9900 CPU. The Geneve use the
  1303. 9995. Well in the not to distance future you may have a new choice
  1304. of what CPU you want to use in your 99/4(A).
  1305.  
  1306. Don O'Neil and Gary Bowser are working on a new product called the
  1307. "Accelerator" for the 99/4(A) community! Rather than just bring the
  1308. 4(A) up to the same microprocessor that the Geneve uses they decided
  1309. to surpass it.
  1310.  
  1311. The 99105A is a third generation 9900 CPU. The first generation
  1312. consisted of the 99xx's (used in the 99/4(a), the second generation
  1313. consisted of the 9995 (used in the geneve) and the third generation
  1314. consists of the 99105A and 99110 (The 99110 is no longer produced by TI).
  1315.  
  1316. Below shows the pin assignments and definitions of the 99105A.
  1317.           ___ ___
  1318. WE/IOCLK =1  U   = MEM               As you can see the TMS99105A is a
  1319.       RD =       = BST1              40 pin dip package, unlike the 9900
  1320.    RESET =       = BST2              which is a 64 pin wide body dip chip.
  1321.      APP =       = BST3
  1322.     HOLD =       = XTAL1/CLKIN       The 99105A is only sold in high
  1323.      VSS =       = XTAL2             reliability specifications. Which
  1324.    READY =       = CLKOUT            means it comes in a ceramic package
  1325.   INTREQ =       = Vss               and the leads of the chip are gold
  1326.      NMI =       = ALATCH            plated.
  1327.      IC0 =       = PSEL/D15/OUT
  1328.      IC1 =       = A14/D14           For further specifications you can
  1329.      IC2 =       = A13/D13           order TI part #MP009, from 1-800-
  1330.      IC3 =       = A12/D12           123-1234. This data book is called
  1331.      R/W =       = A11/D11           the TMS99015A and TMS99110A
  1332.      Vcc =       = A10/D10           Preliminary Data Manual. You may have
  1333. A0/D0/IN =       = A9/D9             to be persistant that you know the
  1334.    A1/D1 =       = A8/D8             data books is available and the TI
  1335.    A2/D2 =       = A7/D7             still makes the chip, because TI
  1336.    A3/D3 =       = A6/D6             doesn't like to discuss 99xx based
  1337.    A4/D4 =     21= A5/D5             chips anymore.
  1338.           -------
  1339.  
  1340. Whats new in the 99105A?
  1341.  
  1342. * Pipe Line Architecture
  1343. * Directly accessable 256K bytes of memory
  1344. * 84-Instruction superset of the TMS9900
  1345.   - Signed multiply and divide
  1346.   - Long word (32-bit) shift, add, subtract
  1347.   - Load status register, load workspace pointer
  1348.   - Stack support - branch and push link, branch indirect
  1349.   - Multiprocessor support - test, test and clear, test and set
  1350. * Privileged mode
  1351. * Macrostore(1) emulation of user-defined instructions
  1352. * Arithmetic falut interrupt
  1353. * Illegal instruction interrupt
  1354. * Multiprocessor system interlock signal
  1355. * Attached processor interface
  1356. * N-channel silicon-gate SMOS technology
  1357.  
  1358. Lets look at some of these new features:
  1359.  
  1360. 1. Pipe Line Architecture. If this chip had nothing more new to add to
  1361.    the 4(A) environment then this, this would be enough. Heres how pipe
  1362.    lining works.
  1363.  
  1364.    This example is from the book "The 99000 Microprocessor" by Avtar
  1365.    Singh.
  1366.  
  1367.    Lets take the assember instructions: A R0,R1.
  1368.  
  1369.    Step Function                    Type
  1370.     1   Fetch instruction           Memory
  1371.     2   Decode instruction          Internal
  1372.     3   Fetch source operand        Memory
  1373.     4   Fetch destination operand   Memory
  1374.     5   Add operands                Internal
  1375.     6   Write resule to destination Memory
  1376.     ( Register to register addition sequence )
  1377.  
  1378.  
  1379.  Instruction fetch
  1380.       Decode
  1381.    Source fetch
  1382.  Destination fetch
  1383.      Process            Instruction fetch
  1384.       Write                  Decode
  1385.                            Source Fetch
  1386.                         Destination fetch
  1387.                             Proces              Instruction Fetch
  1388.                              Write                  Decode
  1389.                                                   Source Fetch
  1390.  \_____________________________ _____________________________________/
  1391.                                V
  1392.                    Prefetch Mechanism
  1393.  
  1394.  " Looking at the instruction sequence, we see that during the
  1395.    two internal operations the system bus to external memory is
  1396.    not busy. To make more efficient use of the system bus, the
  1397.    99000 is implemented with an intelligent instruction prefetch
  1398.    mechanism. With the mechanism, the execution of consecutive
  1399.    instructions is overlappped. This feature is also known as
  1400.    pipelining.
  1401.  
  1402.    Notice that while the first instruction is being processed,
  1403.    the 99000 initiates an instruction acquisition memroy bus
  1404.    cycle to fetch the next instruction. This second instruction
  1405.    is decoded while the results from the first instruction are
  1406.    being written to memory. In this way, we see that during each
  1407.    of the six steps of the addition instruction, the system bus
  1408.    is always in use."
  1409.  
  1410.    As you can imagine this improves system through put dramatically
  1411.    with out running the system any faster. The 99000 prefetch is
  1412.    intellegent. On the 99xx your program counter gets an instruction
  1413.    and increments the program counter (PC), well if the instruction that
  1414.    was just fetched happens to be a jump or branch instruction then
  1415.    the microprocessor just turns around and updates the program
  1416.    counter. With an intellegent prefetch the system "knows" if the
  1417.    instruction just fetched is a jump or branch if it is the system
  1418.    updates the PC with the next memory location to be used, NOT the
  1419.    next seqentail address.
  1420.  
  1421.  
  1422. 2. More memory (up to 256K bytes). Heres what the memory map looks like
  1423.    in extended mode. The way this is done is by using PSEL and (BST1-
  1424.    BST3) to provide extended address lines.
  1425.  
  1426.  
  1427.                 MAIN MEMORY SPACE
  1428.                        |
  1429.           -------------------------------
  1430.           |                             |
  1431.      INSTRUCTION                      DATA
  1432.        SEGMENT                      SEGMENT
  1433.          (64K)                       (64K)
  1434.           |                             |
  1435.       ------------                 ------------
  1436.       |          |                 |          |
  1437.     PAGE 0     PAGE 1            PAGE 0     PAGE 1
  1438.      (64K)      (64K)             (64K)      (64K)
  1439.    \_____________________ ________________________/
  1440.                          V
  1441.                      256K BYTES
  1442.  
  1443.    Of course on a standard 4(A) you would need a special memory board
  1444.    to take advantage of this much memory. (Don is working on a way to
  1445.    fix you up with a new memory board also).
  1446.  
  1447. 3. Macrostore
  1448.    An entire book could be deducated to the subject of Macrostore alone.
  1449.    In brief, macrostore is a way to add to the native instruction
  1450.    set of the 99000. Lets say you need an op-code that will give you
  1451.    the square root of a number. Define it! Then in your source code
  1452.    you can have an instruction like SQRT R1 or SQRT R1,R2!
  1453.  
  1454.    TI had one version of the 99000 that had the entire UCSD pascal
  1455.    kernal all in Macrostore code. The 99110A had floating point
  1456.    instructions built into its macrostore. This eliminated the
  1457.    need to have a seperate numeric coprocessor.
  1458.  
  1459. 4. Privileged Mode.
  1460.    When privileged mode of operation is selected two levels of operators
  1461.    are created, one designated the user and the other the supervisor.
  1462.    Certain instructions are then barred for use from the users
  1463.    programs. These operations include SBO, SBZ, LDCR, LIMI, RSET,
  1464.    LST, RTWP, IDLE, CKON, CKOF, LREX LDS, LDD. All of these op
  1465.    codes modify settings that could disturb the running of other
  1466.    programs in a multiuser/multitasking environment.
  1467.    So in short this mode of operation was designed to facilitate
  1468.    the development of multiuser/multitasking system software.
  1469.  
  1470. 5. Attached processor interface + Attached computer interface.
  1471.    The 99xxx family has the capability to "attach" either another
  1472.    computer or processor to its self. This is similar to the 8086
  1473.    family of processors ability to use an 8087. Although with the
  1474.    ability to have special floating point opcodes in macro store
  1475.    a numeric co-processor is not need. (For detailed information
  1476.    on a 99110 V.S. an 8086 with a co-processor see.....
  1477.  
  1478.    Here is the evaluation
  1479.    sequence that the 99xxx goes through when it goes to execute
  1480.    the next op code from a program:
  1481.  
  1482.    If it is a stndard op code then "Execute standard MicroCode"
  1483.       Else
  1484.    If (*) an attached computer then "Invoke and continue"
  1485.       Else
  1486.    If (*) an attached computer then "Invoke and wait"
  1487.       Else
  1488.    If it is an opcode defined in Macrostore then "Invoke emulation"
  1489.       Else
  1490.    If it is an opcode defined in main memory the "Invoke emulation"
  1491.       Else
  1492.    Handle as an illegal opcode.
  1493.  
  1494. * it is an opcode recognised by..
  1495.  
  1496.  
  1497. 6. Op Code Compression
  1498.    While not highlighted as a feature 99xxx family another 
  1499.    interesting aspect to its design is the way op-codes are
  1500.    scrunched in memory. This allows much more efficient use
  1501.    of the pipeline fetches.
  1502.  
  1503. Who to contact about availability:
  1504.  
  1505. Bud Mills
  1506. 166 Dartmouth Drive
  1507. Toledo, OH 43614-2911
  1508. (419)-385-5946
  1509.  
  1510. Tenative price is two hundred and fifty US dollars.
  1511.  
  1512. References:
  1513.  
  1514. Singh, Avtar, "The 99000 Microprocessor". Englewood Cliffs, N.J.:
  1515. Prentice-Hall, Inc, 1984. ISBN 0-13-622846-1
  1516.  
  1517. Texas Instruments Incorporated, TMS 99105A and TMS99110A 16-Bit
  1518. Microprocessors Preliminary Data Manual. Houston:Texas Instruments
  1519. INC, Nov. 1982
  1520.  
  1521. L.D.O.M. 12.6.96
  1522. ==========================================================================
  1523.  
  1524. DTIHM015
  1525.  
  1526.     #1           5-JUL-1992 18:59:42.60                                     MAIL
  1527. From:   BOS::JHWHITE
  1528. To:     EICHER
  1529. CC:
  1530. Subj:   bugs, bugs, and more bugs
  1531.  
  1532. Dan:  I've been looking over the console ROM source code and have located the
  1533. main problem with the interrupt routine.  Two instructions are reversed.  The
  1534. console ROM has the following:
  1535.  
  1536.  0918  020C  LI   R12,>0F00     loads CRU base with >0F00
  1537.  091A  0F00                       to start CRU scan of DSR peripherals
  1538.  091C  1D01  SBO  1             enables meaningless bit >0F02
  1539.  
  1540. The above can be seen (in slightly different fashion) on page 29 of TI Intern.
  1541. What should be there is the reverse, which could solve lots of trouble:
  1542.  
  1543.  0918  1D01  SBO  1             clears External Interrupt and re-enables
  1544.  091A  020C  LI   R12,>0F00     loads CRU base with >0F00
  1545.  091C  0F00                       to start CRU scan of DSR peripherals
  1546.  
  1547. So just dump a working console ROM, search for 020F1D in the even bank, and
  1548. replace with 1D020F.  Replace 0C0001 in the odd bank with 010C00.  If you
  1549. want, I can send you fixed ROM files with correct CRC values at the end.
  1550.  
  1551. With the TI RS232 DSR, TI compounded the interrupt problem by (re-)enabling
  1552. the RS232 interrupt even if the the RS232 was not the initiating peripheral.
  1553. The fix is a one byte change.  An excerpt from TECHNICAL DRIVE (pp32,33)
  1554. shows the problem code:
  1555.  
  1556.  40EA  1F10  TB   >10               ** Test for character received
  1557.  40EC  1310  JEQ  $+>22     >410E   ** Yes?, then jump
  1558.  40EE  1F1F  TB   >1F               ** Data set change, timer interrupt
  1559.                                     ** transmitter interrupt?
  1560.  40F0  1632  JNE  $+>66     >4156   ** No?, then jump
  1561.  40F2  C306  MOV  R6,R12            ** Restore CRU address
  1562.      ....
  1563.  4156  1D12  SBO  >12               ** Set receiver interrupt enable
  1564.  4158  C306  MOV  R6,R12            ** Restore CRU
  1565.  415A  1E07  SBZ  >07               ** Turn off LED
  1566.  415C  0455  B    *R5               ** Return
  1567.  
  1568. Any interrupt that is not cleared before the CRU peripheral scan gets to the
  1569. RS232 will cause the RS232 interrupt to turn on.  The console ROM interrupt
  1570. bug (for which I gave the fix) causes ALL peripherals to be checked for
  1571. interrupts unless a DSR clears the External Interrupt with the equilavent
  1572. of:  CLR R12; SBO 1.
  1573.  
  1574. An example of the problem is the Digit AVPC and the TI RS232, which share
  1575. the External Interrupt line.  The RS232 is normally at CRU>1300 and the
  1576. AVPC is at CRU>1400.  The VDP interrupt is active on the External Interrupt
  1577. line.  The console CRU peripheral scan finds the RS232 interrupt routine
  1578. first, which we'll assume is supposed to be inactive.
  1579.  
  1580. The RS232 interrupt routine tests the CRU bits on the UART's (9902A's), and
  1581. falls through to the instruction at >40F0, which determines that there is
  1582. no active RS232 interrupt.  Then it jumps to the instruction at >4156 which
  1583. turns ON the RS232 interrupt (BAD MOVE) and is followed by the exit back
  1584. to the CRU peripheral scan.
  1585.  
  1586. No more RS232 interrupt routines are available, so the CRU peripheral scan
  1587. goes to the next peripheral, at CRU>1400 -- the Digit AVPC.  The AVPC
  1588. interrupt routine should then execute properly (though Digit and OPA DSR's
  1589. are somewhat lacking, either failing to test conditions or leaving the
  1590. interrupt hanging).  For the sake of this attack on TI code, I'll leave
  1591. Digit and OPA out of it.  Just assume that the AVPC DSR does everything it
  1592. should as if the TI code was not buggy.
  1593.  
  1594. The first VDP interrupt goes as planned.  However, now the RS232 port 2
  1595. interrupt is enabled whether it was supposed to be or not.  And the console
  1596. ROM did not clear the External Interrupt (the bigger problem).  Consider
  1597. the failure to clear the External Interrupt again.  If that line is never
  1598. reset, the first VDP interrupt causes the interrupt routine to be active
  1599. each time interrupts are turned on whether an actual interrupt occurs or
  1600. not.
  1601.  
  1602. The RS232 mis-activated interrupt only becomes a problem when the RS232 port
  1603. 2 receive buffer gets filled.  Normally, RS232 interrupts are only activated
  1604. by the RS232 Circular Buffer routine used by TE's.  This too can cause trouble
  1605. if the AVPC is installed without a circumventing DSR.  But the bug in the
  1606. RS232 DSR also means that TE's that do polling rather than use interrupts
  1607. will cause problems with the AVPC installed.
  1608.  
  1609. Now to the RS232 fix.  If no RS232 interrupt is active, the RS232 interrupt
  1610. routine should not turn them on.  This means that the instruction at >40F0
  1611. should be changed to jump to >4158 instead of >4156:
  1612.  
  1613.  40F0  1633  JNE  $+>68     >4158
  1614.  40F2  C306  MOV  R6,R12
  1615.   ...
  1616.  4156  1D12  SBO  >12
  1617.  4158  C306  MOV  R6,R12
  1618.  415A  1E07  SBZ  >07
  1619.  415C  0455  B    *R5
  1620.  
  1621. Thus, if you dump your RS232 EPROM and find >32 at byte offset >00F1, replace
  1622. it with >33.
  1623.  
  1624. I'll hold off on sending you a workable AVPC DSR until you tell me which of
  1625. the above fixes you implement.  Fixing both the console ROM and RS232 DSR
  1626. is the best alternative.
  1627.  
  1628. Jeff White
  1629.  
  1630. ============================================================================
  1631. DTIHM016
  1632.  
  1633. Setting up user interupt routines.
  1634. by Jeff White
  1635.  
  1636.  
  1637. 37476 13FEB93-2100 General Information
  1638.      RE: CLIPBOARD99 (Re: Msg 37475)
  1639.      From: JHWHITE      To: EICHER
  1640.  
  1641. Dan:  Simply daisy-chain your interrupt routine over any already loaded at
  1642. address >83C4.  Check the value at >83C4 upon loading your interrupt routine.
  1643. Whatever its value, you should save it in your routine.  Now copy the start
  1644. address of your interrupt routine to >83C4.  At the end of your interrupt
  1645. routine, check the address you saved.  If not zero, branch to it.  Otherwise
  1646. return.         Jeff
  1647.  
  1648. p.s.: This is the correct procedure for any VDP interrupt driven routine.  You
  1649. save the address at >83C4 into the new interrupt routine before putting the
  1650. start address of the new routine at >83C4.  Then you check the value you saved
  1651. at the end of your interrupt routine, and if equal, return, else branch to the
  1652. previous interrupt in the chain.
  1653.  
  1654. -*-
  1655.  
  1656.  
  1657. 37495 14FEB93-2009 General Information
  1658.      RE: CLIPBOARD99 (Re: Msg 37484)
  1659.      From: JHWHITE      To: JDELEKTO
  1660.  
  1661. Joe, you are quite right that daisy-chaining interrupt routines slows things
  1662. down.  I am aware of means to speed things up.  Console sprite motion, sound,
  1663. and quit key interrupts can be disabled by simply make bit 0 (MSbit) of the
  1664. interrupt flag byte at >83C2 equal to 1.  The user interrupt routine can still
  1665. be active, and it can use the interrupt flag byte to flag various interrupt
  1666. routines.  In fact, the byte at >83C3 is NEVER used by the console (though
  1667. some Dijit AVPC systems use it), so you can have an interrupt flag word.
  1668.  
  1669. The user interrupt routine(s) can control sprite motion any way you wish, and
  1670. the motion information can be in CPU memory instead of VDP memory if the
  1671. routine is written to handle it.  Sounds lists are not limited to VDP or GROM
  1672. memory either.  Even a fast keyscan can run off the interrupt if you desire.
  1673.  
  1674. If you decide to use the the console interrupt routines (bit 0 of byte >83C2
  1675. equal to 0), there are still the 12 lsbits of the WORD at >83C2 to flag
  1676. user interrupt routines.  You can have more than 12 if you are content to
  1677. let the 4 msbits of byte >83C2 serve dual purpose (no console ROM-driven
  1678. sprite motion if byte >837A is >00, no console ROM-driven sound if byte
  1679. >83CE is >00, no quit key if not pressed).  Or if you are really clever, you
  1680. can use all 16 bits of the word at >83C2 to flag user interrupt routines by
  1681. reversing polarity.  I.e., if any of the 4 msbits of word >83C2 is 1, then
  1682. the related user interrupt routine is executed while the related console
  1683. ROM-driven interrupts are not.  The 12 lsbits of word >83C2 can flag up to
  1684. 24 interrupt routines (if both bit values enable).
  1685.  
  1686. Of course, you could redefine the word at >83C2 to work differently than the
  1687. console usage.  When bit 0 is 0, the 12 lsbits can mark 4096 locations in an
  1688. interrupt vector table.  When bit 0 is 1, the 15 lsbits can mark 32768 locations
  1689. in an interrupt vector table.  With the AMS/AEMS or 4A Memex systems, you are
  1690. only limited by your imagination (and how much of a slowdown you can stand).
  1691.  
  1692. If you want to execute 32768 interrupt routines in rote, make bit 1 of >83C2
  1693. equal to 1 and load user-interrupt vector >83C4 with the address of the
  1694. user-interrupt handler.  Use the 5 msbits of the 15 lsbits of >83C2 to mark
  1695. a page of AMS memory, and the 10 lsbits of the 15 lsbits of >83C2 to mark an
  1696. offset in that page.  If you want BLWP vectors, two words will have to be
  1697. marked by each of the 10 lsbits, or the entire 4K of each of the low 32 pages
  1698. could be used.  However, the two words could be used as a pseudo-BLWP vector.
  1699. The 5 msbits of each word in the pseudo-BLWP vector could be used to mark
  1700. which pages of the next 32 pages (eg, 32-63) the routine and its workspace
  1701. use.  The 11 lsbits of each vector address would mark the word offset.  If
  1702. you wanted, the workspace pointer of the pseudo-BLWP vector could point to
  1703. a page in 32-63, and the program counter of the pseudo-BLWP vector could
  1704. point to a page in 64-95.
  1705.  
  1706. Of course, each time the user-interrupt handler is called, the value in the
  1707. word at >83C2 is incremented and the msbit is set to 1 to prevent console
  1708. ROM-driven interrupts from taking place.  Though if console ROM-driven
  1709. interrupts are needed, the use-interrupt handler can still have up to 4096
  1710. interrupt routines handled in rote.  Just use bits 4 and 5 of word >83C2
  1711. to mark 4 pages of AMS memory for the 4096 pseudo-BLWP vectors.  The 10 lsbits
  1712. of >83C2 would be the vector offset in the page.
  1713.  
  1714. This all seems quite ridiculously esoteric, doesn't it?  However, you may now
  1715. be thinking about what I am about to describe.  A VDP-interrupt-driven OS --
  1716. VIDOS for short -- that puts the OS opcode number in the up to 15 (12 if you
  1717. want to use console sprite motion, sound lists, and quit) lsbits of >83C2.
  1718. The user-interrupt handler now becomes the VIDOS opcode handler with a few
  1719. simple modifications.
  1720.  
  1721. Say we use only the 12 lsbits of >83C2.  A value of >000 tells the VIDOS to
  1722. run its interrupt service routine.  Values >001-FFF can be opcodes that do
  1723. something.  The 4 pages marked by the 2 msbits would contain the pseudo-BLWP
  1724. vectors just as I described above.  Parameters can be passed to the VIDOS
  1725. opcode in CPU PAD, VDP PAD, or some page mappable to the 32K memory.
  1726.  
  1727. In fact, you could even do a GPL interpreter with this VIDOS.  Say that
  1728. GPL opcodes >00-FF are passed to VIDOS as >C00-CFF.  This would put the
  1729. pseudo-BLWP vectors in the 4th page (11b), and the opcode marks the right
  1730. vector.
  1731.  
  1732. That should be enough food for thought right now.  Sure, the interrupt routine
  1733. of the console ROM is not that great.  But some great things can be done with
  1734. it and enough memory.
  1735.  
  1736. Jeff White
  1737.  
  1738. p.s.: I had another message describing another method to handle user interrupts,
  1739. but I accidentally deleted it.
  1740.  
  1741. -*-
  1742. ============================================================================
  1743. DTIHM17
  1744.  
  1745. Interupts
  1746. by Jim Ness
  1747.  
  1748.            INTERRUPT ME!
  1749.            -------------
  1750.   How to use (and abuse) your computer's interrupt capabilities. 
  1751.              -By Jim Ness
  1752.  
  1753. ----------------------------------------
  1754.  
  1755.            October, 1984
  1756.            *************
  1757.  
  1758.   Whether you program in assembly language on a TI99/4A computer, or most any
  1759. other, you probably have come across a few references to "Interrupt Handling."
  1760.   If you react to the unknown the way I do, you probably skipped it, because
  1761. you didn't need to know what it was all about. Once I had some of the basics of
  1762. assembly language programming down, I came back to it. I had just seen an int-
  1763. errupt driven clock/timer program, and decided it was time to see what made it
  1764. tick (sorry, it was irresistable).  In this first chapter, we'll see what
  1765. interrupts are all about. Why are they necessary, when do they come in handy,
  1766. and a beginning on the do's and dont's of programming with interrupts.
  1767.                *****
  1768.   The beast we all call "Computer" is a narrow minded individual. It does what
  1769. you tell it and does not pay attention to anything else. From the time you turn
  1770. the power on, it is performing a task.   In the case of the TI99/4A, a "power-
  1771. up" routine is run, checking all the closets and corners to see what periph-
  1772. erals are connected, and then displaying the color bar screen, and waiting for
  1773. you to press any key.
  1774.  
  1775.   The problem with single-mindedness is that there are always a couple of things
  1776. you would like to be able to do at any point in a program. For instance, you
  1777. would like to be able to "QUIT" at any time. But if your program is busy adding
  1778. numbers or printing text or displaying graphics, it doesn't care about your de-
  1779. sire to "QUIT." It's busy.
  1780.  
  1781.   The solution is to have a timer stop the program on a regular schedule, and
  1782. check to see if there are alternate tasks to perform, such as paying atten-
  1783. tion to the goof trying to "QUIT."
  1784.  
  1785.   The TI99/4A, and all other modern computers have that capability built in to
  1786. the operating system. Traditionally it is used to implement internal functions
  1787. such as system reset or peripheral data transfers (disk or cassette). You don't
  1788. want your program to move along before your disk drive is finished transferring
  1789. data, for instance.
  1790.  
  1791.   But in the case of the ole TI99/4A, there is provision made for the user to
  1792. add his/her own interrupt. There is an address located in the onboard CPU RAM
  1793. which is checked 60 times per second. If there is a memory address "poked" in-
  1794. to here, the program will branch to that address and perform what ever task
  1795. is placed there. So, you could have a keyboard scan routine there to check for
  1796. a "QUIT" command. Or a screen color or character change command. Or any pro-
  1797. gram your little heart desires.
  1798.  
  1799.              ********
  1800.   If you have read up on interrupts in the TI99/4A Editor/Assembler manual, you
  1801. will have seen their mention of using up all the processor's time handling the
  1802. interrupts. THIS is the big pitfall.   Suppose you design a little routine to
  1803. re-define each of the characters and the screen color, but you don't pay too much
  1804. attention to the efficiency of your program. You may end up with quite a long
  1805. routine. Say your routine takes 150 ms to perform, more than a tenth of a sec-
  1806. ond. Remember that an interrupt routine will be called each time 1/60th of a
  1807. second has passed.
  1808.  
  1809.   So here is the resulting time-frame:
  1810.  
  1811.  -  17 ms - The program
  1812.  - 150 ms - The interrupt
  1813.  -  17 ms - The program
  1814.  - 150 ms - The interrupt
  1815.  -  17 ms - The program
  1816.   (**etc**)
  1817.  
  1818.   You can see that the interrupt routine will run in its entirety each time, but
  1819. the main program runs in tiny jerks and has to keep stopping for the interrupt
  1820. routine. The result is that the main program ends up running very sllooowwww.
  1821. And you have slowed it down just so you could have your favorite characters and
  1822. screen color.
  1823.  
  1824.   The point is that if you want to use an interrupt routine, it must be very
  1825. short and efficient. It must do one very important thing and quickly go back to
  1826. the main program. The ideal interrupt would finish up in the 1/60 second time
  1827. slot that the clock allows. If it took exactly 1/60 (17ms) it would share time
  1828. on a 50/50 basis with the main program,so even that is a little too long.
  1829.  
  1830.  It is hard to figure if your interrupt program will be too long, but here is a
  1831. rule of thumb to follow: Make yoursource listing no more than 20 lines
  1832. long. The resulting program, after assembly, regardless of what it is, will
  1833. be short enough.
  1834.  
  1835.   Your homework question:
  1836. Which method of file access would be acceptable for use in an interrupt rou-
  1837. tine?     
  1838.            (A) Disk Drive
  1839.            (B) Cassette
  1840.            (C) 128k card
  1841.            (D) Minimemory
  1842.  
  1843.   Well, if you have been paying attention, you know that none of the above is
  1844. usable. Because of the time restrictions that must be followed, you just can't
  1845. wait for data to be transferred, even at the speed that the MMM and 128k 'ram
  1846. disk provides.
  1847.  
  1848.   One question that has come up is where can we 'poke' the starting address of
  1849. our routine so that it will run. Per the Editor/Assembler manual, the address of
  1850. the user defined interrupt routine must be put into >83C4. The simplest way to
  1851. do this is to use an 'AORG' statement near the end of the program, to force
  1852. the loader to move to that memory address, and then use a 'DATA' statement to
  1853. fill that address with the beginning address of your routine.  Check the ex-
  1854. amples below to see what I mean.
  1855.  
  1856.   Through the magic of TI-EXTENDED BASIC file handling routines, I am appending
  1857. my DV80 source code files to this text, so you can see the examples. If you do
  1858. not wish to take the time to go through them, just key "A" to abort this section
  1859. on the BBS, and check back later, if you want.
  1860.  
  1861.   The source codes shown are in DV80 format and sometimes exceed the 40 col-
  1862. umns on your screen, so you will see a few wraparounds. One way to solve the
  1863. problem is to save what appears and reread it with the Editor/Assembler in
  1864. edit mode, or with TI-Writer.
  1865.  
  1866.   The two programs shown are SETCOLOR & SETCHAR, both of which appeared in the
  1867. D/L section of this BBS. Setcolor will change the color of screen and chars in
  1868. Xbasic, and Setchar adds a real lower case charset. Each of them override the
  1869. Xbasic interpreter's defaults.
  1870.  
  1871.              ---------
  1872.  
  1873. ***************************
  1874. *                         *
  1875. *  ASSEMBLY LANGUAGE      *
  1876. *  ROUTINE TO CHANGE      *
  1877. *  THE TEXT AND SCREEN    *
  1878. *  COLORS IN X-BASIC      *
  1879. *  FOR PROGRAMMING        *
  1880. *                         *
  1881. *  BY LARRY BENTLEY       *
  1882. *  9/29/84                *
  1883. *                         *
  1884. ***************************
  1885.        DEF  COLOR
  1886. *
  1887. * SET EQUATES FOR XBASIC
  1888. VMBW   EQU  >2024
  1889. VWTR   EQU  >2030
  1890. C      DATA >F4F4,>F4F4,>F4F4,>F4F4  * SET 8 BYTES ASIDE TO LOAD
  1891. COLOR  LI   R0,>07F4                 * CHAR COLORS. ALSO LOAD VDP
  1892.        BLWP @VWTR                    * R1 WITH SCREEN BKGRD COLOR
  1893.        LI   R0,2048                  * START LOADING CHARSET COL-
  1894.        LI   R1,C                     * ORS
  1895.        LI   R2,8
  1896.        BLWP @VMBW
  1897.        LI   R0,2056
  1898.        BLWP @VMBW
  1899.        LI   R0,2064
  1900.        BLWP @VMBW
  1901.        LI   R0,2072
  1902.        BLWP @VMBW
  1903.        B    *R11                     * RETURN TO MAIN ROUTINE
  1904.        AORG >83C4                    * DURING LOADING, MOVE TO >83C4
  1905.        DATA COLOR                    * PUT THE ADDRESS REPRESENTED BY
  1906.        END                           * COLOR INTO >83C4
  1907.  
  1908. *--------------------------------------------------*
  1909. **********************************
  1910. * THIS ASSEMBLY LANGUAGE ROUTINE *
  1911. * CHANGES THE DEFAULT LOWER CASE *
  1912. * CHARACTERS TO TRUE LOWER CASE, *
  1913. * INSTEAD OF JUST SMALL CAPS.    *
  1914. *  -BY JIM NESS, OCT. '84        *
  1915. **********************************
  1916.        DEF  LOWCAS
  1917. VMBW   EQU  >2024
  1918. CHARS  DATA >0000,>0070,>0838,>4874          ; a
  1919.        DATA >0040,>4078,>4444,>4478          ; b
  1920.        DATA >0000,>0038,>4440,>4438          ; c
  1921.        DATA >0004,>043C,>4444,>443C          ; d
  1922.        DATA >0000,>0038,>447C,>403C          ; e
  1923.        DATA >0018,>2420,>7020,>2020          ; f
  1924.        DATA >0000,>0438,>4438,>047C          ; g
  1925.        DATA >0040,>4078,>4444,>4444          ; h
  1926.        DATA >0010,>0030,>1010,>1038          ; i
  1927.        DATA >0008,>0018,>0808,>4830          ; j
  1928.        DATA >0040,>4048,>5070,>4844          ; k
  1929.        DATA >0030,>1010,>1010,>1038          ; l
  1930.        DATA >0000,>0078,>5454,>5454          ; m
  1931.        DATA >0000,>0058,>2424,>2424          ; n
  1932.        DATA >0000,>0038,>4444,>4438          ; o
  1933.        DATA >0000,>0078,>4478,>4040          ; p
  1934.        DATA >0000,>0038,>4454,>4834          ; q
  1935.        DATA >0000,>0058,>6440,>4040          ; r
  1936.        DATA >0000,>003C,>4038,>0478          ; s
  1937.        DATA >0010,>1038,>1010,>1408          ; t
  1938.        DATA >0000,>0048,>4848,>4824          ; u
  1939.        DATA >0000,>0044,>4428,>2810          ; v
  1940.        DATA >0000,>0044,>5454,>5424          ; w
  1941.        DATA >0000,>0044,>2810,>2844          ; x
  1942.        DATA >0000,>0044,>2418,>1060          ; y
  1943.        DATA >0000,>007C,>0810,>207C          ; z
  1944. LOWCAS LI   R0,>0608      * START AT CHR 97, VDP ADDR >0608
  1945.        LI   R1,CHARS      * REFER TO ABOVE NEW CHARS
  1946.        LI   R2,208        * 208 NEW BYTES
  1947.        BLWP @VMBW         * LOAD THEM
  1948.        RT                 * RETURN TO XBASIC
  1949.        AORG >83C4         * DURING LOADING, GO TO >83C4
  1950.        DATA LOWCAS        * STICK THE ADDR OF THIS ROUTINE THERE
  1951.        END
  1952.  
  1953. -----------------------------------------------------------------
  1954.  
  1955.   So that is the end of my article on the use of interrupts in assemble
  1956.   language programs. Hopefully you have some new info now that you can
  1957.   use in future programs.
  1958.  
  1959.  
  1960. ============================================================================
  1961. DTIHM018
  1962.  
  1963.  
  1964. 40849 28OCT93-2315 Communications
  1965.      Circular Interrupt Input Buffer Operatio
  1966.      From: JHWHITE      To: BRADSNYDER
  1967.  
  1968. Here it is, the complete TI description of the circular interrupt input
  1969. buffer operation.
  1970.  
  1971. Home Computer EIA RS232C Peripheral Specification      08MAR 82
  1972.  
  1973.  
  1974.  
  1975. 7.0  CIRCULAR INTERRUPT INPUT BUFFER OPERATION
  1976.  
  1977.  
  1978.      THIS FEATURE CANNOT BE USED IN A BASIC LANGUAGE PROGRAM
  1979. BECAUSE OF THE COMMON CPU RAM USAGE, LOCATIONS 0-5.
  1980.  
  1981.      This option is enabled by calling the RS232  peripheral
  1982. DSR  with an operation code of HEX 80, most siginificant bit
  1983. set plus an OPEN operation code in, the I/O opcode (byte  0)
  1984. of  the  PAB.  The  normal processing for an OPEN command is
  1985. executed but the receive interrupt is enabled as part of the
  1986. OPEN.
  1987.  
  1988.      The CPU RAM usage is as follows:
  1989.   LOCATION          MEANING
  1990.      0-1 (2 byte) address of start of buffer area
  1991.        2 (1 byte) length of buffer (1-255 bytes)
  1992.        3 (1 byte) callers read offset value
  1993.        4 (1 byte) RS232 DSR write offset value
  1994.        5    1 byte NOT DEFINED
  1995.  
  1996.      When the RS232 get an interrupt it attempts   to  store
  1997. the the input data byte to VDP memory address (word 0 + byte
  1998. 4  offset  +  1) address. When (byte 3 offset)=(byte 4 offet
  1999. +1) an overrun error  is  declared  and  the  data  byte  at
  2000. address  (word  0 + byte 4 offset) is overwritten with a HEX
  2001. FE as long  as  this  condition  is  present.  If  an  input
  2002. hardware  framing, overrun, or parity error occurs and there
  2003. is not an overrun condition a HEX  FF  is  returned  as  the
  2004. character code. When (word 0 + byte 4 offset + 1) > (byte 2)
  2005. the write offset (byte 4) is set to zero and  (word 0 + byte
  2006. 4 offset) is used as the write address. This functions as  a
  2007. circular interrupt buffer.
  2008.  
  2009.      A  user  of  this  feature  should  read  data whenever
  2010. (byte 3) <> (byte 4). each time a data byte is read (byte 3)
  2011. should be incremented by one. Inorder to read data increment
  2012. (byte 3) to the next offset and then use the address (word 0
  2013. + byte 3). When (word 0 + byte 3 offset + 1) > (byte 2)  the
  2014. read  offset  (byte  3)  is set to zero and (word 0 + byte 3
  2015. offset) is used as the read address.
  2016.  
  2017.      When input is done in this manner the  software  switch
  2018. options  described  in the GENERAL SPECIFICATION SECTION 3.1
  2019. have no effect. However the hardware switch options  control
  2020. the input TMS9902.
  2021.  
  2022.      The  output  section of the port that is OPENed in this
  2023. manner may still be used so  long  as  the  hardware  switch
  2024. options  are the same. One OPEN statement can OPEN input for
  2025. interrupt mode and output with switch  options  because  the
  2026. interrupt input ignores the software switch options.
  2027.  
  2028.  
  2029.  
  2030.                           PAGE   8       ** TI Internal Data **
  2031.  
  2032.  
  2033. p.s.: It is typed exactly as it was printed.
  2034.  
  2035. -*-
  2036.  
  2037.  
  2038. ===========================================================================
  2039. DTIHM019
  2040.  
  2041. Corcomp RS232 and PIO Internals
  2042. by Jeff White.
  2043.  
  2044. 33837 25AUG92-2240 General Information
  2045.      RE: TI FAIR (Re: Msg 33834)
  2046.      From: JHWHITE      To: LEIGHTYM
  2047.  
  2048. Michael:  The following is part of a message I sent Email to Dan Eicher and/or
  2049. Don O'Neil in regards to the Corcomp RS232.  Unfortunately, I cannot find the
  2050. rest of it.  Maybe Dan or Don can provide the "rest of the story" if they have
  2051. filed the message better than I did.
  2052.  
  2053. "Here are the CorComp PIO port definitions:
  2054.  
  2055.    Pin(s)      Function
  2056.    ------      --------
  2057.       1         Strobe
  2058.     2-9         D7-D0
  2059.      10         Busy
  2060.      11         Ground
  2061.      12         10 Ohm PU to +5V
  2062.      13         Spare Busy
  2063.      14         Spare Strobe
  2064.      15         1K PU to +5V
  2065.      16         GND
  2066.  
  2067. Here are the CorComp CRU bit definitions and 9901 connections.  A10 is inverted
  2068. to swap P0-P15 to the lower bits:
  2069.  
  2070.    CRU I/O   Function       9901
  2071.    -------   --------       ----
  2072.       0      ROM enable      P0
  2073.       1      Spare flag      P1
  2074.       2      Strobe          P2
  2075.       3      Spare strobe    P3
  2076.       4      Flag bit        P4
  2077.       5      RS232/1 CTS-    P5
  2078.       6      RS232/2 CTS-    P6
  2079.       7      LED             P7
  2080.      8-15    D0-D7          P8-15
  2081.  
  2082.    CRU Input Function       9901
  2083.    --------- --------       ----
  2084.       21     Spare Busy    !INT5
  2085.       22     Busy          !INT6
  2086.  
  2087. The 9901 interrupt line is not connected to the bus.  Bits 0-15 of the CC are
  2088. really outputs, though their states can be read.  P1 and P4 are unconnected,
  2089. so they act as "flag" bits.  P8-P15 can be used as PIO Inputs if the 9901 is
  2090. programmed properly.  !INT1 to !INT4 are unconnected, so they have little
  2091. functionality.  However, the 9901 Clock on an internal !INT3 can be used for
  2092. timing purposes.  !INT7 to !INT15 are shared by P15 to P7, respectively.
  2093.  
  2094. The card has no buffer chips (244 or 245) on it, which means the 9901 and 9902
  2095. chips are not isolated from the backplane bus.  Also, applying inputs to the
  2096. PIO port while the the 9901 is programmed to Output mode on just one of the
  2097. data or strobe pins can destroy the 9901.  It would have been better had bit 1
  2098. of the CRU been designated the I/O select bit (as it is on the TI card) such
  2099. that it could control a bidirectional bus.  Software that put the bus into..."
  2100.  
  2101. I lost a very important part of that message.  Note how the data lines (D0-D7)
  2102. are attached to the 9901 and PIO port -- BACKWARDS!  This means that sending
  2103. out the Corcomp PIO port requires the bits of the data byte to be reversed
  2104. with a standard cable (and in the standard DSR).  Reversing the data bits means
  2105. program overhead -- an algorithm to reverse them, a lookup table, or some
  2106. combination of the two.
  2107.  
  2108. IMHO, it is a colossal waste of a 9901 to use it as it was on the Corcomp RS232
  2109. card.  259's and 251's are cheaper, and easier to get, if you want to put the
  2110. _parallel PIO_ (redundancy for effect) on the _serial_ CRU bus.
  2111.  
  2112. Sure, if CC had hooked the 9901 up correctly, a simple "LDCR Rx,8" would have
  2113. worked.  Instead, it requires a "LDCR @revbit(Rx),8" or some algorithm before
  2114. the "LDCR Rx,8" (see source code to Fast Term or Mass Transfer for PaulC's
  2115. kludge code).
  2116.  
  2117. On the TI, MYARC, and Ultracomp, you can "MOVB Rx,@PIO" to send out the PIO
  2118. port.  The Axiom interface will use the "LDCR Rx,8" without reversing the
  2119. data bits -- i.e., Axiom has the data lines hooked INTELLIGENTLY.
  2120.  
  2121. My recommendation for anyone designing a new RS232 card with PIO port is to
  2122. simply put the PIO port at byte >5FFE (the top of DSR space).  It's quite
  2123. silly to limit the DSR to only 4K, when 8K EPROM's are not much more expensive.
  2124. Sure, a new DSR would be needed, but only for the PIO part.  The serial ports
  2125. should still left as is for compatibility reasons.
  2126.  
  2127. Jeff White
  2128.  
  2129. (c) Copyright 1992
  2130.  
  2131.  
  2132. 33855 27AUG92-0119 General Information
  2133.      RE: TI FAIR (Re: Msg 33853)
  2134.      From: JHWHITE      To: LEIGHTYM
  2135.  
  2136. Michael:  I never said the bits weren't right on the PIO port.  They are
  2137. attached incorrectly to the 9901.  Need an example, huh?  Say that you load
  2138. the value for 'A' into R2 and put it on the CC PIO port:
  2139.  
  2140.  CCPIO  EQU  >1310
  2141.  A      TEXT 'A'
  2142.         EVEN
  2143.  START  LI   R12,CCPIO
  2144.         MOVB @A,R2
  2145.         LDCR R2,8
  2146.         ...
  2147.  
  2148. The ASCII value for 'A' is 65 or >41 or b01000001.  Now look what that LDCR
  2149. instruction does.  It starts at CRU>1310, puts bit 7 of R2 there, goes to
  2150. CRU>1312, puts bit 6 there, etc.  I.e., the following is what you get:
  2151.  
  2152.        CRU bit      Value        PIO data line
  2153.         >1310         1              D0
  2154.         >1312         0              D1
  2155.         >1314         0              D2
  2156.         >1316         0              D3
  2157.         >1318         0              D4
  2158.         >131A         0              D5
  2159.         >131C         1              D6
  2160.         >131E         0              D7
  2161.  
  2162. Note that in TMS 9900 lexicon, bit 0 is the MSbit and bit 7 is the 8th MSbit.
  2163. Thus, what the Corcomp did was put the 8th MSbit of R2 (in the example) at
  2164. the MSbit position of the PIO port, the 7th MSbit at the 2nd Msbit, or to
  2165. wit:
  2166.  
  2167.       PIO data line  R2 MSbyte
  2168.             MSbit    8th MSbit
  2169.         2nd MSbit    7th MSbit
  2170.         3rd MSbit    6th MSbit
  2171.         4th MSbit    5th MSbit
  2172.         5th MSbit    4th MSbit
  2173.         6th MSbit    3rd MSbit
  2174.         7th MSbit    2nd MSbit
  2175.         8th MSbit        MSbit
  2176.  
  2177. Now you should see that rather than get 'A' on the port, you get character 130
  2178. (b10000010 or >82) on the port.  Therefore, to put 'A' on the CC PIO port, you
  2179. could put the value >82 in R2 and do the LDCR R2,8.  In any event, the bits
  2180. must be reversed in the data byte before being sent out the CC PIO port, or
  2181. you would rewrite the DSR and swap the data lines on the PIO cable.
  2182.  
  2183. I've got two MYARC, one Corcomp, one Ultracomp, and used to some TI RS232
  2184. cards here.  They are all quirky, but by far the Corcomp is the biggest
  2185. kludge.  However, without the '244 on the CC PIO port, it CAN be bidirectional.
  2186. You must be VERY careful though when hooking an input device to the CC PIO
  2187. per this version of the card, as it CAN and WILL destroy the 9901 if inputs
  2188. are allowed while the 9901 data lines are in output mode.  It might not do
  2189. the external device any good either.
  2190.  
  2191. Now what exactly is wrong with the MYARC PIO?  I guess you are referring to
  2192. the missing CTS lines.
  2193.  
  2194. Jeff White
  2195.  
  2196. p.s.:  How much does the 9901 cost?  How about the 259?  I expect on a bad day,
  2197. you could buy twenty 74LS259's for the price of one 9901 (if you can find it).
  2198.  
  2199. p.p.s.:  If you do copy Corcomp's PIO design, I hope these messages haunt you
  2200. for the rest of your life.  :-)
  2201.  
  2202. -*-
  2203. =============================================================================
  2204. DTIHM20
  2205.  
  2206. Bring your Myarc RS232 into the nineties!
  2207. By Jeffrey H. White and Dan H. Eicher
  2208.  
  2209. When the Myarc RS232 card first came out, people were impressed by the fact
  2210. that this card could be opened at 19,200 bps! TI and Corcomp had only listed
  2211. open statement up 9,600 bps in their manuals. It was only later ( after we had
  2212. become much more sophisticated, right? ) that we came to realize that the
  2213. RS232's manufactured by the big three ( TI, Corcomp and Myarc ) were all
  2214. capable of very fast speeds.  In the cases of Corcomp and TI cards, 19.2 ( as
  2215. it is commonly called ) was not coded into the DSR bit rate tables, but they
  2216. are actually capable of these speeds and more, if you are working in assembly. 
  2217.  
  2218. What follows below is two modifications that can be made to the Myarc RS232
  2219. card. The first is a simple fix that will make the second serial port function.
  2220. The other is an upgrade/enhancement to the abilities of your card!
  2221.  
  2222. Some people ( myself included ) have had difficulties using the second RS232
  2223. port on Myarc cards. This is because of a design screw-up. The orginal board
  2224. layout did not properly implement the RS232 port. The DTR line from pins 18 and
  2225. 19 was hooked up to an output of the quad line receiver (1489), and the
  2226. corresponding input was then connected to the !CTS (pin 6) and !DSR (pin 7)
  2227. inputs of the 2nd UART (9902A). It only takes three jumpers to fix this, but
  2228. some times these jumpers were installed wrong or not at all by Myarc when
  2229. shipping RS232 cards.
  2230.  
  2231. Here is what you need to do to ensure your card is modified to function
  2232. properly with its second port:
  2233.  
  2234. The trace from pin 4 of the 1489 must be cut so there is no continuity with
  2235. pins 6 and 7 of the closer 9902A. Still on the front of the card is a trace
  2236. from pin 6 of the 1489 to a solder pad between pins 4 and 5 of the quad line
  2237. driver (1488) that must be cut. On the back of the card, the trace from pin 6
  2238. of the 1489 to the leg of a 2.2k resistor must be cut. On the back, run a
  2239. jumper from the solder pad between pins 4 and 5 of the 1488 ( trace from pin 19
  2240. of the D-sub ) to pin 4 of the 1489, then from that pin 4 to the leg of the
  2241. 2.2k resistor. Jumper from pin 6 of the 1489 to either pin 6 or 7 of the closer
  2242. 9902A. 
  2243.  
  2244. If this is done correctly, your second RS232 port should work, given no bad
  2245. solder joints or chips. The quickest and easiest way to check this modification
  2246. out is to use a TI built Y-splitter cable for the RS232 and hook a modem with
  2247. status lights up to the second port. If everything seems to work, you are set.
  2248. Alternatively, if you have a Y-splitter cable and a breakout box, you can now
  2249. use the breakout box to test functionality of the second port.
  2250.  
  2251. On to the enhancement:
  2252.  
  2253. As high speed modems have become more commonplace, a few transitions in the
  2254. typical use of RS232 have occurred. The first being in the area of speed. When
  2255. the TI RS232 card was originally designed, one of its primary purposes was to
  2256. interface to a printer -- in fact, TI's impact printer ( an Epson with the TI
  2257. logo ) was designed for serial usage. The maximum bit rate for the typical
  2258. printer of that time was around 120 CPS ( Characters Per Second ), with each
  2259. character requiring around 9 bits, so it was no real challenge for the RS232
  2260. port to keep up with the printer.  
  2261.  
  2262. Very quickly, with the rise of the TIBBS BBS by Ralph Fowler, hooking up a
  2263. modem became the thing to do..... We have all seen the gradual increase in
  2264. modem speeds occur. First 300, then 1200, followed shortly by 2400. But, only
  2265. within the past year have 9600 and 14.4 modems become affordable to us common
  2266. users. 
  2267.  
  2268. While 300/1200/2400 bps modems present computers and serial ports with little
  2269. challenge, the same can not be said for speeds over 9600 ( actually a 9600 bps
  2270. modem runs even faster, if you consider modems implementing MNP5 and 42 bis
  2271. utilize 'on the fly' data compression ).  
  2272.  
  2273. The first change that must occur to accomodate faster communication speeds is
  2274. your communication software. There are two primary methods of handling flow
  2275. control.  Flow control refers to the agreed upon way of deciding if the
  2276. computer or the device it is talking to ( a modem perhaps ) is ready to send or
  2277. receive. At low transmission speeds ( under 9600 baud ) the most common form of
  2278. flow control is called XON/XOFF. This can be accomplished using only 2 wires (
  2279. Transmit and Receive ). This works based upon the practice that both devices
  2280. have agreed upon characters they will both utilize for "OK to send" (XON) and
  2281. "Whoah, hold on a sec!" (XOFF). 
  2282.  
  2283. This method does not work very well at high speeds. The problem is, in between
  2284. the time it takes for one system to say, "Whoah, hold on a sec!" and the other
  2285. system actually "Whoahs," an awful lot of data can pass under the bridge. 
  2286.  
  2287. So, what do you do? You use some more of the pre-defined control wires in the
  2288. RS232C definition. The wires most commonly used for this function are DTR and
  2289. RTS. However, the current RS232 cards are wired like a modem, so the wires
  2290. that we will use are properly called DSR and CTS. You need not understand this
  2291. peculiarity of the RS232 cards.
  2292.  
  2293. In order to fully explain the modification we are about to make to your card, a
  2294. little hardware detail will be presented. In the TI RS232, TI used certain
  2295. Communication Register Bits to control the functionality of their card. Here
  2296. are the TI definitions as compared to current and added definitions on the
  2297. Myarc:
  2298.  
  2299. Bit #      Function                                     Myarc
  2300.   0        DSR ROM page Bit, 1=active                   Same
  2301.   1        PIO Port Mode Control, 1=Input               STROBE
  2302.   2        PIO Output "STROBE" bit                      Mode Control
  2303.   3        Spare PIO output strobe                      LED, 0=On
  2304.   4        Flag Bit, 1=Set                              DSR (*)
  2305.   5        CTS - control, Primary RS232 port, 0=Active  CTS 1 (+)
  2306.   6        CTS - control, Secondary RS232 port          CTS 2 (+)
  2307.   7        LED Control, 1=ON                            spare
  2308.  
  2309. (*) - This pin's usage is NEW to all three cards, and it can be used to hang
  2310. up a modem by toggling the modem DTR line.  Some terminal emulators and some
  2311. BBS software packages connect the secondary CTS line to the modem DTR line
  2312. to implement this function.
  2313.  
  2314. (+) - These are the flow control lines new to the Myarc card.  
  2315.  
  2316. Those terminal emulators and BBS software packages that connect the secondary
  2317. CTS line to the modem DTR line, do not work with Myarc cards, because the CTS
  2318. line is in-operative as supplied by Myarc. We will fix that.
  2319.  
  2320. ENHANCEMENT ( Working Directions! )
  2321.  
  2322. The first thing you will need to do is run down to your local Radio Shack and
  2323. pick up part number 276-2520, its a MC1488. ( FYI - its mate, the MC1489, is
  2324. also available as part number 276-2521. They are both listed as costing $1.29 a
  2325. piece in the '94 catalog.) While you are there you may want to pickup some
  2326. wire-wrap wire (278-501,502 or 503 ) and a wire-wrap wrapper/stripper
  2327. (276-1570) -- the stripper part is hidden in the handle! In fact, you can pull
  2328. the wrapper portion out of the handle and stick it on cordless screw driver and
  2329. make an auto-wrap tool!
  2330.  
  2331. Ok, if you have a soldering iron and solder we are good to go.....
  2332.  
  2333. Step 1.
  2334. Take the cover off. 
  2335.  
  2336. Step 2. 
  2337. Orient the board so that you are looking down at the chips and the edge
  2338. connector is facing you. Now remove the 3 resistors in the top right-hand
  2339. corner. You now have six holes where the resistors use to be, fill the three on
  2340. the left-hand side with solder. Make sure the holes on the right-hand side are
  2341. clear, because you will be sliding jumper wires through them. 
  2342.  
  2343. It will look something like this....
  2344.  
  2345. 1  *      * 4
  2346. 2  *      * 5
  2347.      3 *       *  6 
  2348.  
  2349.    ___ ___
  2350.  1 =|  U  |= 14
  2351.  2 =|     |= 13
  2352.  3 =|  1  |= 12
  2353.  4 =|  4  |= 11
  2354.  5 =|  8  |= 10
  2355.  6 =|  8  |= 09
  2356.  7 =|_____|= 08
  2357.  
  2358. Step 3. 
  2359. Take out your new 1488 and piggy-back it to the existing 1488 by soldering pins
  2360. 1, 7 and 14 together ( if this chip is socketed, please remove it from the
  2361. socket before piggy backing it ). Next bend up the unsoldered pins. 
  2362.  
  2363. Step 4.
  2364. You will need three short and three long jumper wires.
  2365.  
  2366. Solder a short jumper wire from solder hole 4 to pin 11 of the piggy-backed
  2367. 1488. Solder another short jumper wire from solder hole 5 to pin 6 of the
  2368. piggy-backed 1488. Solder the final short jumper wire from solder hole 6 to pin
  2369. 8 of the piggy-backed 1488. 
  2370.  
  2371. Now for the long jumpers. 
  2372.  
  2373. Solder pins 4 & 5 of the piggy backed 1488 together. Run a jumper wire from
  2374. that connection through solder hole 2. On the back side connect this to pin 11
  2375. of the 74LS259 ( which is the farthest chip away from the 1488 on the top row).
  2376. Note: Since you are now working on the backside of the board, pin numbering
  2377. is reversed, so the 259 we are talking about is numbered like this:
  2378.     ___ ___
  2379. 16 =|  U  |= 1
  2380. 15 =|     |= 2
  2381. 14 =|  7  |= 3
  2382. 13 =|  4  |= 4
  2383. 12 =|  2  |= 5
  2384. 11 =|  5  |= 6
  2385. 10 =|  9  |= 7
  2386. 09 =|_____|= 8
  2387.  
  2388. Solder pins 9 & 10 of the piggy-backed 1488 together. Run a jumper wire from
  2389. that connection through solder hole 3, on the back side connect this to 09 of
  2390. the 74259.
  2391.  
  2392. Solder pins 12 & 13 of the piggy-backed 1488 together. Run a jumper wire from
  2393. that connection through solder hole 1 ( now the only one remaining ). On the
  2394. backside connect this to pin 10 of the 74259. 
  2395.  
  2396. OK, that's it for the hardware mods. Double-check everything. Tape down the
  2397. three long jumper wires on the back and put the case on. You have now added
  2398. three more control lines to the RS232 port that you can use to implement
  2399. hardware flow control in your software. 
  2400.  
  2401. Here are the assembler instructions to manipulate these three lines:
  2402.  
  2403.         LI   R12,>1300      CRU base of RS232 card 1
  2404.         SBZ  4              activate DSR
  2405.         SBZ  5              activate primary CTS
  2406.         SBZ  6              activate secondary CTS
  2407.         SBO  4              de-activate DSR
  2408.         SBO  5              de-activate primary CTS
  2409.         SBO  6              de-activate secondary CTS
  2410.  
  2411. CRU bit 7 is left as a spare.  There is also a spare line driver on the MC1488.
  2412. We could attach pin 12 of the 74LS259 to pin 2 of the MC1488, then run a wire
  2413. from pin 3 of the 1488 to an otherwise unused pin on the 25-pin RS232
  2414. connector.  Another option would be to use CRU bit 7 for another control signal
  2415. out the parallel port (without using the 1488).  Right now we are happy to have
  2416. "fixed" the MYARC RS232.
  2417.  
  2418. About the only thing we have not discussed in this article is how to change
  2419. the Myarc card from RS232/1&2 to RS232/3&4. This will be explained later in
  2420. a user note.
  2421.  
  2422. Many people have asked us where can they buy hard to come by 99XX chips ( such
  2423. as the 9902A's used in the RS232). There are two routes to go. One not so sure,
  2424. but very cheap, the other guaranteed to have what you need, but a little on the
  2425. pricey side.
  2426.  
  2427. The cheap route: look in your local phone book for computer scrap or salvage
  2428. people. They usually have tons of 99XX chips that they will be glad to part
  2429. with at a fair price.
  2430.  
  2431. The more expensive route is to call Newark Electronics at 1.312.784.5100. These
  2432. people should be able to tell you the number for your local Newark office ( or
  2433. just look in the phone book under electronics ). They have 9901's, 9902's, and
  2434. a few others.
  2435.  
  2436. L.D.O.M. 03.26.94
  2437.  
  2438.  
  2439. ============================================================================
  2440. DTIHM021
  2441.  
  2442. 39139  8JUN93-2122 General Information
  2443.      RE: SKEW (Re: Msg 39135)
  2444.      From: JHWHITE      To: JERRYC
  2445.  
  2446. Jerry, I still think this needs to be clarified a bit further, especially
  2447. your definition of rotational delay.  I can live with the definition of skew,
  2448. since it is rather simple to visualize and is what HyperCopy reports.
  2449.  
  2450. What bothers me about the definition of rotational delay is that it assumes
  2451. the disk will rotate past the index hole after stepping from any track to the
  2452. next.  Assume the following is the logical sector pattern for two tracks of
  2453. a disk:
  2454.  
  2455.   0  1  2  3  4  5  6  7  8  <-- physical sectors
  2456.  
  2457. o 8  4  0  5  1  6  2  7  3
  2458.  
  2459. o 5  1  6  2  7  3  8  4  0
  2460.  
  2461. The interlace is 2, and the skew is 6.  The rotational delay stepping from
  2462. the first track after reading its last LOGICAL sector to the next track and
  2463. the availability of its logical zero sector is the time it takes to pass
  2464. over physical sectors 1 through 7.  This is 7 sectors.
  2465.  
  2466. A single density TI disk can have approximately 25,000 bits of information,
  2467. or 3,125 bytes per track.  Seven 256-byte sectors is 1,792 bytes plus the
  2468. gap bytes.  The rotational delay takes over 100ms during the step.
  2469.  
  2470. Therefore, if 35ms is the optimum rotational delay for this disk, there should
  2471. be over 60ms for the disk controller to re-synchronize to the second track
  2472. without passing the last physical sector or the gap information preceding and
  2473. following the index pulse.
  2474.  
  2475. Jeff
  2476.  
  2477. -*-
  2478. =============================================================================
  2479. DTIHM022
  2480.  
  2481. 46809  7JUN95-2243 9640 GENEVE
  2482.      RE: Three and a half inch drives (Re: Msg 46798)
  2483.      From: JHWHITE      To: JCARVER
  2484.  
  2485. John, maybe I can explain it simply.  The Geneve will boot from an 80-track
  2486. disk in an 80-track drive with any controller.  This includes the TI floppy
  2487. controller, but you are limited to single density.
  2488.  
  2489. Once MDOS is loaded, it defaults to how the controller would work on the
  2490. 99/4A.  In most cases, this would make MDOS treat the drives as 40-track.
  2491. Unfortunately, in sector 0 of the disk, it is marked as being 80-track.
  2492. This is not so bad, I suppose, if the OS -- that is, MDOS -- can be set
  2493. to treat the drive as 80-track.
  2494.  
  2495. It just so happens that if MDOS ignores the tracks-per-side value stored
  2496. on the disk except when the drive is considered 80-track, the first 40
  2497. tracks on side 0 of the disk can be treated as the entire side of the
  2498. "imagined" 40-track disk.
  2499.  
  2500. Sector 1 of the disk holds the file descriptor index records, and these
  2501. are actual sector number values.  Therefore, read operations of files
  2502. that completely fit within the first 40 tracks of side 0 are accessible
  2503. (I think) just as if they were on a 40-track disk.
  2504.  
  2505. So AUTOEXEC and SETDSK can be at the beginning of the disk to force MDOS
  2506. to 80-track drive operation.  If SETDSK is not used, the 80-track disk
  2507. would be corrupted by writing to it.
  2508.  
  2509. This is because the bitmap in sector 0 -- not used during most read
  2510. operations -- for a 720K disk marks allocation units consisting of
  2511. 2 sectors each.  Each time an 80-track disk bitmap were updated as
  2512. if it were 40-track, additional sectors would be marked as used.
  2513.  
  2514. If we compare the logical sector layout of a 40-track disk to an 80-track
  2515. disk, we can see the logical overlap:
  2516.  
  2517.            40-track           80-track
  2518. Side 0     0-719              0-719
  2519.            -----              720-1439
  2520. Side 1     -----              1440-2159
  2521.            720-1439           2160-2879
  2522.  
  2523. Getting less murky now.  Whether MDOS thinks the drive is 80-track or
  2524. not, it will translate sectors 0-719 as an access to side 0 of the disk
  2525. in the first 40 tracks.  Sectors 720-1439 would not be found, because
  2526. MDOS would look on the wrong side of the disk for them -- in the area
  2527. reserved for sectors 2160-2879.
  2528.  
  2529. This is because sectors count up on side 0 as the read/write heads move
  2530. toward the hub, and ALSO count up on side 1 as the read/write heads move
  2531. away from the hub.
  2532.  
  2533. Looking at the physical overlap of the sectors, we have the following:
  2534.  
  2535.            40-track           80-track
  2536. Side 0     0-359              0-719
  2537.            360-719            720-1439
  2538. Side 1     720-1079           1440-2159
  2539.            1080-1440          2160-2879
  2540.  
  2541. The drive logic always treats the outer (largest concentric) track as
  2542. track 0.  On a 40-track disk, side 1, moving the head to track 39 (the
  2543. 40th track) finds sector 720.  On an 80-track disk, side 1, moving the
  2544. head to track 39 finds sector 2160.
  2545.  
  2546. If this has not made your head spin faster than your floppies (300rpm
  2547. in most cases, 360rpm for 1.2 Meg 5.25" and single density 77 track
  2548. 8"), what happens when you format a disk in an 80-track drive when
  2549. your software treats it as 40-trac?  It makes it logically look like
  2550. a 40-track disk (whilst in an 80-track drive running 40-track software).
  2551. In this case, the physical overlap is:
  2552.  
  2553.             40-track           80-track
  2554. Side 0      0-359              0-719
  2555.             360-719            -----
  2556. Side 1      720-1079           -----
  2557.             1080-1440          720-1440
  2558.  
  2559. Now I am beginning to think of onion slices and at least 4 food colorings
  2560. to bring this discussion to yet another level....
  2561.  
  2562. Thankfully, I was taught not to play with my food.  And disk formats are
  2563. certainly nothing to cry over -- unless of course it is an accidental
  2564. format of the disk holding valuable data.
  2565.  
  2566. Jeff White
  2567.  
  2568. -*-
  2569.  
  2570. ==========================================================================
  2571.  
  2572. DTIHM023
  2573.  
  2574. Disk Controllers -- an Addendum   March, 1987
  2575. By Jerry Coffey
  2576.  
  2577.  
  2578. I mentioned a "turbo" modification to lock out the "read after write"
  2579. (write verify) routine usually performed by the controller.  Here are
  2580. the details:
  2581.      Find the 74LS251 chip at the top center of the controller board,
  2582. above the DIP switches and beside the large FDC chip (marked WD1770).
  2583. Solder a wire from the number 2 pin of the 74LS251 through a switch to
  2584. ground (e.g. the wide trace of the DIP switches or any trace connected
  2585. to that wide trace).  It looks about like this from the bottom (non-
  2586. component side) of the board.
  2587.  
  2588.             |      ______________________      _______
  2589.             |     /                      Switch       to ground
  2590.             |    .|......
  2591.     top     |    --------     ----         ^
  2592.     of      |   |        |   |DIP |        |
  2593.     Myarc   |   >        |   |swch|       Location of the
  2594.     contrlr |   |74LS251 |   |    |       switch is up to you
  2595.     board-->|    --------     ----
  2596.             |
  2597.             |   -----------------
  2598.             |  |                 |
  2599.             |  |                 |
  2600.             |  |                 |
  2601.             |  >   WD 1770       |
  2602.             |  |                 |
  2603.             |  |     (or 1772)   |
  2604.             |  |                 |
  2605.             |   -----------------
  2606.             |
  2607.  
  2608. As always you proceed at your own risk.  (One person has told me this
  2609. did not work om his 40 track system, but I haven't verified that.)  You
  2610. can tell it is working if your controller writes as fast as it reads
  2611. (normally the write takes twice as long).
  2612.  
  2613. Since I wrote the article on disk controllers, I have discovered some
  2614. surprising facts about my own system.  All of the Myarc timings in the
  2615. article were done on an 80 track system with the fast WD1772 controller
  2616. chip (stepping at 2ms).  With some help from Paul Charlton and Richard
  2617. Roseen, I recently customized Paul's Eprom to step at 3ms using the
  2618. WD1772.  (Richard's drives were making errors at the faster speed.) I
  2619. used a Mechatronics Eprom programmer to download the Eprom code to
  2620. disk, changed the FDC commands with a sector editor, and wrote the
  2621. altered code back to a fresh Eprom.  The process is simple (and cheap)
  2622. once you decide what code you need in the Eprom.
  2623.  
  2624.  
  2625.  
  2626. The slower step speed made it possible to notice some slight
  2627. differences in the performance of the WD1772.  The first thing I
  2628. noticed was that interlace 4 on 18 sector tracks was no longer smooth
  2629. -- it was missing the first sector after a track seek and forcing an
  2630. extra revolution of the disk.  This was the first clear indication of
  2631. how close this format is to the "ragged edge".  The reaction to the
  2632. small change in step speed implies that this interlace comes within 5%
  2633. of the minimum time required to step and settle the head.  Thus the
  2634. likelihood of read/write errors is relatively high with this interlace.
  2635. It will occasionally detect the sector ID and begin to read or write
  2636. before the head has completely settled.  This interlace should
  2637. definitely be avoided -- 18/3 is both faster and more reliable.
  2638.  
  2639.  
  2640.  
  2641. The Eprom modification itself was an interesting experience.  I patched
  2642. the new FDC commands into some unused text bytes and patched addresses
  2643. into the code to point to the new locations.  The Mechatronics Eprom
  2644. Programmer is an excellent piece of equipment.  It will burn (program)
  2645. a 2764 (8k) in about 90 seconds using the fast algorithm.  I have
  2646. talked to Jim Horn and Jeff Guide about offering an Eprom service to
  2647. the customers of Disk Only Software.  There are many possibilities this
  2648. technique opens up.  There is the 80 track modification for the TI
  2649. controller worked out by Andy Cooper.  And many Myarc owners are still
  2650. using old Eproms that have never been upgraded (though this situation
  2651. has improved since Lou Phillips increased his production capacity).
  2652. The fix we developed for Richard's controller can provide the optimum
  2653. step speed (3ms or 5ms) for different disk drives using the WD1772 FDC
  2654. chip.  And any enterprising programmer can get his tailor-made code
  2655. installed in nonvolatile memory.
  2656.  
  2657.     Jerry Coffey  [74716,3525]
  2658.  
  2659. ============================================================================
  2660. DTIHM24
  2661.  
  2662. A Hard Drive Odessey (Oddity)
  2663. By Dan H. Eicher
  2664. &  Jeffrey H. White 
  2665.  
  2666. Recently I put a one gigabyte SCSI drive on my pc. (A personal note: if you are
  2667. going to use SCSI on a PC, buy an Adaptec brand controller.) This left me with
  2668. two Seagate ST277R hard drives that had performed five years of great service. 
  2669.  
  2670. About this time, Jeff and I were assembling a system to work on the GenMod
  2671. Geneve / WHT SCSI compatibility problem. Of course I needed two external cases
  2672. to hold these drives. The best place I found for getting external cases with
  2673. power supplies is Mendelson's Electronics: 1-800-344-4465. Their supply is hit
  2674. and miss, but they usually have something usable at a very reasonable price.
  2675.  
  2676. I got my cases in and built the cables. While you can still buy RLL controller
  2677. cables - which are usable with the Myarc HFDC - usually the length is wrong so
  2678. you will need to build your own. You can buy the parts you need to build the
  2679. cables from JDR Micro Devices:
  2680.  
  2681. IDE34 - 1 to hook to the HFDC plus an additional connector for each HD.
  2682.  
  2683. IDE20 -\  These are the data cable. 1 each for every hard drive.
  2684. IDS20 -/
  2685.  
  2686. IDS16 - This is the TI side of a printer cable.
  2687. IDCEN36 - This is the Printer side of a printer cable.
  2688.  
  2689. To crimp these cables you will need a vice ( if you go this route, you need to
  2690. be very careful ) or buy a cable crimper. JDR's part number is HT-214 and is
  2691. well worth the money.
  2692.  
  2693. We got the hardware assembled and now it was time to reformat the hard drives
  2694. to work on the TI. We dug out our specifications on the drive ( I still have my
  2695. orginal owners manual ) and put the values into MDMV. We had to guess at the
  2696. interlace value for the HFDC/Seagate 277R drives and GenMod geneve combination.
  2697. After the formatting was finished, the drives could be read, but not written
  2698. to. We tried over and over with different MDMV settings. None of them seemed to
  2699. work. In a moment of desperation I tried using CFORM; I had the same luck as
  2700. MDMV.  
  2701.  
  2702. In order to save myself some time, I decided to try only formatting the first
  2703. 10 cylinders in my quest for a working (not optimal, but working) interleave.
  2704.  
  2705. Well after trying this little stunt, CFORM came back and told us that track 0
  2706. or media on this device was BAD! Yegads! After this error message we could not
  2707. coax another complete format out of either MDMV or CFORM. 
  2708.  
  2709. Our last resort, and it was a last resort, was to put together a PC system with
  2710. an RLL controller. Fortunately, Jeff owns an original Seagate brand RLL
  2711. controller. Immediately, the Seagate controller recognized the drive and type.
  2712. It made quick work of the formatting of these drives. 
  2713.  
  2714. We moved the drives back over to the GenMod Geneve system and this time the
  2715. reformatting went without a hitch. I could read and write data with no
  2716. problems. In fact, the drives seemed to work much quicker than similar drives
  2717. we have in house. 
  2718.  
  2719. Later we went up to Chicago and asked Mike Maksimik what he thought my have
  2720. went wrong. He told us that probably the gap value between sectors was too
  2721. small for the drive - that is, a bug in CForm. 
  2722.  
  2723. He knew how to fix the problem, but apparently there is a disagreement between
  2724. Mike and Don Walden regarding royalty payments, so no fix will be forthcoming
  2725. from Mike. 
  2726.  
  2727. We asked Mike why CForm could not just go in and redo the gap values, like the
  2728. Seagate controller did. Mike says that this a bug in the 9234 controller chip
  2729. used in the HFDC. In simplistic terms, the chip must read this value before
  2730. changing it. If the value is wrong an error is returned. The chip should then
  2731. disregard the error, and reformat with the correct value. The 9234 has a fatal
  2732. bug, that if an error occurs during this process the chip locks up. There
  2733. unfortunately is no way to work around this problem in software. 
  2734.  
  2735. This is the reason why occasionally a hard drive will become so messed up on a
  2736. TI, the only recourse is to take it to a PC and do a low level format with an
  2737. RLL or MFM controller card. 
  2738.  
  2739. A few notes: We have found that RLL drives seems to work fine with the Myarc
  2740. HFDC. You should always attempt to use the buffered head step (0) in the MDMV
  2741. menu. You should avoid using CForm, and only use MDMV on the Geneve to format
  2742. drives. Of course to load MDMV and use the format routine on a Geneve you must
  2743. page in the ROM.
  2744.  
  2745. Using RomPage means that the Geneve's Master DSR is paged out, so the only
  2746. devices you have access to are drives connected to the HFDC and/or those
  2747. connected to a Myarc floppy controller. It is much easier just to hook up a TI
  2748. and format the hard drives and then use them on the Geneve. 
  2749.  
  2750. If you want to load MDMV on a Geneve to format with and you need the Rom Paged
  2751. in the easiest way is to go into TI BASIC, issue a CALL INIT, CALL
  2752. LOAD(-32766,186), NEW, and then do a CALL MDM.
  2753.  
  2754. Also when purchasing connectors to build your cables, always buy high quality,
  2755. gold-plated, double-leafed connectors. 
  2756.  
  2757. While moving MDOS source code around and testing the GenMod Geneve and WHT SCSI
  2758. card we have found the Syquest EZ135 to be very reliable. It works as fast as
  2759. all but the fastest SCSI hard drives on the Geneve, offers removable media of
  2760. 135 Megs and can be set at any SCSI ID. The Syquest drive is the perfect
  2761. companion for a WHT SCSI card. We have also played a bit with the Iomega SCSI
  2762. Zip drive. It is a MUCH less reliable unit, it is locked into SCSI ID's 5 and 6
  2763. which are incompatable with MDOS. MDOS wants to see all hard drives at ID's 0,
  2764. 1 and 2.
  2765.  
  2766. Global Computer Products has a sale on SyQuest EZ135 for 179 dollars, part
  2767. number GDC92225E, the phone number is 1-800-845-6225.
  2768.  
  2769. L.D.O.M. 05.01.96
  2770. ============================================================================
  2771. DTIHM25
  2772.  
  2773. The 9224: A failed experiment or an educational experience?
  2774. by Dan H. Eicher, eicher@delphi.com
  2775. and Jeffrey H. White, jhwhite@delphi.com
  2776.  
  2777. About three years ago Beery Miller was working full bore on trying to
  2778. implement the level 2 routines for the Myarc Hard Floppy Disk Controller
  2779. (HFDC)  in  MDOS. He was having some problems so he called Standard
  2780. Microsystems,  the people that make  the  disk  controller chip in the Myarc
  2781. HFDC.  At that  time  the  support engineer  he was talking to told him that
  2782. the 9234 was a buggy chip -   somewhat experimental.  He recommended a
  2783. complete redesign of the controller board to use a then newer chip that
  2784. would support the then current RLL hard drives.
  2785.  
  2786. This  not  being  possible,  he recommended the possible  retro-fitting  of
  2787. the Standard  Microsystems  9224 disk controller chip which appeared to be
  2788. pin  for pin  and register level compatible with the currently in-use 9234.
  2789. Beery  said the  only difference mentioned to him by the support engineer was
  2790. that the  9224 and  the 9234 computed their ECC value differently.  Meaning
  2791. that a  hard  drive used on one chip could not be used on the other with out
  2792. reformatting.
  2793.  
  2794. Beery  got in a couple of the 9224 chips to test.  He tried one of the chips
  2795. in his  HFDC.   At that time he didn't have a spare hard drive and no easy 
  2796. way  to back up his system.  After placing a 9224 in his HFDC he found that
  2797. he could  no longer  read his hard drive.  His experimentation with the 9224
  2798. stopped  there.
  2799.  
  2800. About  two  years  latter,   Jeff  and I got a  couple  of  9224  from
  2801. Standard Mircosystems.    It says in their component catalog (1988 version)
  2802. that  these chips were designed to be used in Vaxes and Microvaxes, 
  2803. sometimes called Vaxen.
  2804.  
  2805. Another  year  or so went by until we got a spare HFDC and hard  drives  to
  2806. try some  experimentation.  Neither of us were willing to risk doing
  2807. experiments  on our  only HFDC,  they being very temperamental and all.
  2808. Jerry Coffey  was  kind enough to loan us an HFDC to do some testing with. 
  2809.  
  2810. Now, with all that preamble, we finally got around to doing the experiments.
  2811.  
  2812. I  set  the HFDC at CRU >1000 thinking that that would be a  good  CRU
  2813. setting, allowing  us  to  use  DSK1 emulation even if,  later on,   we
  2814. decided  to  add floppy-only controller.
  2815.  
  2816. We  hooked  everything up and the floppy drives were chattering  and  doing
  2817. all sorts of weird things... 
  2818.  
  2819. This,   the  first of a long series of problems,  was caused by a  CRU
  2820. conflict between  the  HFDC and the Myarc 512K card we were using.  The Myarc
  2821. 512K  card responds at CRU >1000 (and >1900).  
  2822.  
  2823. LESSON: Make sure your HFDC is not set at a CRU-base that conflicts with
  2824. another expansion card in your system.
  2825.  
  2826. To  solve this problem,  I needed to change the HFDC's CRU address to  >1100
  2827. so that  there would be no conflict with the Myarc 512K card. To verify that
  2828. the card was set to the correct CRU I used the Minimem module.
  2829.  
  2830. Here  is the procedure I used to verify that the HFDC was showing up at the
  2831. CRU >1100  space.   I selected Minimem,  then I selected Easy Bug.   I  typed
  2832. C1100 <space> then 1,  hit <return>, then the period key. This activated the
  2833. card. Now its  DSR  memory  should show up starting at >4000.  So I typed
  2834. M4000  and  hit <return>.  Easy Bug then responded back with the hex values
  2835. held at the  address starting at >4000. These values should be: 
  2836.  
  2837. >4000 AA
  2838. >4001 OB
  2839.  
  2840. The  >AA means that this is a valid DSR.   The >0B is the revision of  the
  2841. DSR. The current working revision is 11.   A version 12 DSR was distributed, 
  2842. but  it was found to be more buggy then version 11!
  2843.  
  2844. With the HFDC's CRU set up correctly,  it was time to hook the hard drives 
  2845. back up and see what would happen.  Still the same problem...floppy drive
  2846. chatter... argh...  
  2847.  
  2848. OK.  Next step was to make another quick visual inspection of the card. 
  2849. Quickly I  noticed a problem.  The part of the card that sticks out past
  2850. the end of the P-box did not have any electrical tape.  Myarc made an
  2851. engineering blunder. They had  ran control lines from the AM26LS32x chip
  2852. to the hard drives on  a  portion of the card that is scraped by the metal
  2853. clips of the P-box. 
  2854.  
  2855. LESSON: Make sure the neck of the HFDC is protected with tape.
  2856.  
  2857. This was easy to fix with a little electrical tape around the neck,  and we
  2858. were ready to go again.  We tried again.  Same Result. Jeff noticed that the
  2859. card had an  AM26LS32PC.   He  has had some problems with this chip in  the
  2860. past.   This version  of the chip is a marginal component.  The recommended
  2861. replacement is  a AM26LS32AC.  We didn't have one of those so we tried 
  2862. omething else.  Note:  the AM in the part number signifies an AMD part
  2863. number.  
  2864.  
  2865. LESSON: If your system is acting quirky - replace the AM26LS32PC with an
  2866. AM26LS32AC.
  2867.  
  2868. We  disconnected  the  hard drives from the HFDC.  The  system  powered  up
  2869. but wouldn't access floppy drives.  Oops! I had forgotten about the 45 second
  2870. delay, while the HFDC repeadedly waits for a hard drive to activate its ready
  2871. line.
  2872.  
  2873. After waiting for the controller to time out,  I could access the floppy
  2874. drives fine.
  2875.  
  2876. To defeat this power-up timer you must take pin 1 of the inner most LS251
  2877. (U21) to ground,  pin 8 works well for this,  and you may want to put this
  2878. on a toggle switch. - This information courtesy of Tim A. Tesch.
  2879.  
  2880. LESSON: Either jumper your card to bypass the hard drive power-up wait timer
  2881. or wait 45 seconds.  
  2882.  
  2883. All  we  had to do now was hook up the hard drives and test  things  out.
  2884. More floppy drive chattering and then no access to the floppy or the hard
  2885. drives.
  2886.  
  2887. At  this point,  I was nagging Jeff to come up with more ideas.  He  decided
  2888. to offer his HFDC for sacrifice.  No,  he did not torch it -- it does a good
  2889. enough job  toasting itself while in the P-box.   Jeff swapped his with the
  2890. HFDC  from our test system --  the HFDC Jerry had sent us.  The alternative
  2891. was to take the hard  drives from his Geneve and try them with Jerry's HFDC.
  2892.  
  2893. Too risky. The data on the hard drives is worth more than the controller.
  2894.  
  2895. Same symptoms.   Had Jeff's HFDC been fried? Jeff then decided to bring his
  2896. hard drive to the test system with his HFDC.   With Jeff's HFDC and hard
  2897. drive, the system  worked  fine.   Jeff then tried his hard drive with the
  2898. HFDC  Jerry  had sent.  This combination worked as well.
  2899.  
  2900. Using  Jeff's  known working set of cables,  we were able to format one  of
  2901. the hard drives we had for testing.
  2902.  
  2903. We decided to try something new.  We swapped our test cables one at a time
  2904. with Jeff's  known working cables until we determined the original problem  
  2905. was  with the  control cable -  the cable with 34 pins.  ( The other cable
  2906. is  called  the data cable.  ) I checked out this cable with a voltmeter
  2907. and everything appeared fine.
  2908.  
  2909. Theorizing  that  it might be a problem with the length -  it was about  6
  2910. feet long -  I cut the cable in half and applied another connector (Radio
  2911. Shack  part number  276-1564).    We  tried  it with this now shortened
  2912. cable  with  a  new connector and we still had the same problems! 
  2913.  
  2914. We  then sat down and checked each pin on the cable for continuity -   the
  2915. size had been reduced to half the previous length and the pins rechecked.
  2916. But  STILL no difference.  Then,  Jeff got a bright idea.  He reversed the
  2917. cable,  not just rotating  the cable 180 degrees on one end or the other,
  2918. but a 180 degree  turn on both end!  What we were using as pin 1, now become
  2919. pin 34 and what was pin 34 became pin 1. This time the system fired up without
  2920. any drive chattering. 
  2921.  
  2922. How  could  reversing  the  cable make a difference on  a  cable  with
  2923. straight through connections?  Well on the connector -  all odd number pins
  2924. are used  for ground  and all even numbered pins are used for controller
  2925. signals.  Our  theory is that one of the strands in the ribbon cable had a
  2926. crack in it,  causing  high impedence,   but  only  when it was twisted a
  2927. certain  way.   This  strand  when connected the orginal way was on an
  2928. EVEN-numbered pin (i.e.,  a control signal), when  the cable was reversed it
  2929. placed the bad strand on a ground line.   Having one bad ground out of 17 
  2930. ommon grounds didn't cause a problem.  
  2931.  
  2932. LESSON: Always suspect cables. Always have a spare set of known good working
  2933. cables on hand.
  2934.  
  2935. With  the  system  working  we formatted both hard  and  floppy  drives
  2936. without problems.   We pulled the HFDC and put in the 9224.  The first thing
  2937. we  noticed was  terrible drive chattering.  We thought this might be because
  2938. of the  slower step  rates of the 9224 as compared to those of the 9234.  We
  2939. tried various  dip switch settings on the HFDC,  but were not able to get the
  2940. floppies working.  We changed the HFDC's CRU setting to 1200,  inserted a
  2941. Corcomp disk controller  and went on.
  2942.  
  2943. The  next test was to try to access a hard drive previously formatted  with
  2944. the 9234.  Neither hard drive could be read. We (and Beery) expected that
  2945. this would happen  since the two controller chips compute their ECC codes
  2946. differently.   We had  also hoped that Beery's theory was correct that if
  2947. you reformatted  a  hard drive  with  the  9224 that it would be usable.
  2948. Well,   despite  many  attempts (including  upgrading the static memory on
  2949. the HFDC from its factory default  of 8K  (6264)  to the full 32K (62256))
  2950. we were never able to format a hard  drive with the 9224 controller chip. 
  2951.  
  2952. LESSON: Always have the full 32K of memory on your HFDC.
  2953.  
  2954. After  exhausting all possible hardware options,  it would appear  that
  2955. without modification  to  the existing Device Service Routine software,
  2956. that  the  9224 Hard Floppy Disk Controller Chip is not usable on the HFDC. 
  2957.  
  2958. Other things that you can do to help make this temperamental piece of
  2959. equipment more robust is to make sure the 26LS32 is an AM26LS32AC.  You
  2960. should also verify that the 9216 chip is a 9216B -  this chip is the data
  2961. separator.  The 9216B  is specified for faster data throughput.  The 9216
  2962. is overclocked at 8 MHz,  but it may  work fine for double density disks.
  2963.  
  2964. In order to use high density  floppies or  tape backup devices,  you must
  2965. use the 9216B.  I have a hand full  available for five dollars each ( includes
  2966. shipping ).   You should also add heat sinks to the  two  7805 voltage
  2967. regulators.   A good cleaning with an eraser  tip  should also be done, 
  2968. if you notice any dirt on either the P-Box edge connector or hard drive 
  2969. control  cable connector -  the silver looking  connector.   This  silver
  2970. connector  is  coated with a tin-lead compond and does not provide a  real
  2971. good connection - like gold platting would. 
  2972.  
  2973. L.D.O.M. 12.19.95
  2974.  
  2975. =============================================================================
  2976. DTIHM26
  2977.  
  2978. Fixing Blown Bit Maps on the HFDC
  2979. by Edward Hallett
  2980.  
  2981. From:  The Catus Patch BBS
  2982.  
  2983. 11/10/90
  2984. By: TOM WILLS 1 (TUCSON AZ)
  2985. To: ALL
  2986. Sb: HD DIRECTORY FIX
  2987. I was asked if I knew of a way to copy all the files off an HD on the TI which
  2988. has bad directories. The directories are not totally blown, just a few entries.
  2989. And, of course, MDM will not read those directories. Any ideas on this one?
  2990. Also, not all directories are bad, just some. The MDM backup will not work
  2991. because of this, nor can he copy the files from the subdirectories which have
  2992. bad pointers in them. In other words, HELP!
  2993.  
  2994. By: EDWARD HALLETT 6 (TUCSON AZ)
  2995. To: TOM WILLS 1 (TUCSON AZ)
  2996. Sb: HD DIRECTORY FIX
  2997.  
  2998. Tom, I have had to deal with blown diries and or blown file headers on both
  2999. Ida's and my harddisks on several different occasions. The vast majority of the
  3000. files can be salvaged in most cases. The range of difficulty will depend upon th
  3001. number of blown sectors, their location and the size of the hard disk. Files for
  3002. which a backup copy exists on floppy do not need to be recovered but only need
  3003. to have their blown pointers removed so that the other files can be copied off
  3004. the hard disk. Files that do not have a backup on floppy need to have their
  3005. headers, pointers, directories etc. repaired so that they can be salvaged by
  3006. copying them off the hard disk. I use a program called Hard Master by Asgard
  3007. Software I think, when I need to fix a hard disk. The Hard Master program is
  3008. similar to the SectorOne program but I like Hard Master better. It is a hard
  3009. and floppy sector editor with a Tree function, Map function, and much more. Its
  3010. docs also explain alot about the hard disk sector mapping etc. As far as
  3011. procedure to fix the hard disk I would suggest the following as a general
  3012. procedure.
  3013.  
  3014. 1. Run the hard disk test with MDM5. this will mark any bad sectors. Note the
  3015. number of bad sectors found and their approximate location on the hard disk. Are
  3016. they all at the begining of the disk, some in the middle etc.?
  3017.  
  3018. 2. If any bad sectors were identified during the test try to identify the exact
  3019. sector numbers by using Hard Master to step thru the sectors in the suspected
  3020. area with its sector read function.
  3021.  
  3022. 3. Using Hard Masters Tree function print out a tree listing of the directories
  3023. only. If a bad sector is a directory sector you will have to remove the pointer
  3024. to that directory to get to the rest of the directories.
  3025.  
  3026. 4. Using the Tree Function after removing any pointers that were causing
  3027. trouble print out a tree listing of both directories and files. These tree
  3028. listings tell you what sors the headers are in and what sectors the file act-
  3029. ually occupies. You may hit some bad pointers during the file tree listing and
  3030. they will have to be removed before you can get the listing to complete as in
  3031. the directory tree listing.
  3032.  
  3033. 5. At this point you should have a detailed tree listing of both directories and
  3034. files and a list of bad sector numbers. You would also have recorded any
  3035. information about the pointers you may have removed. With the bad pointers
  3036. removed and the bad sectors marked you should now be able to copy the remaining
  3037. files from the hard disk to floppies. I would recommend doing this file by file
  3038. rather than with the back up routine. Of course you only need to copy the files
  3039. that you don't already have backup copies.
  3040.  
  3041. 6. At this point you are ready to rebuild the pointers for the directories and
  3042. or files that you had to remove to get the other files off the hard disk. If the
  3043. directory or file header was located in what is now a bad sector just pick an
  3044. unused sector at the top of the hard disk and write your new header block there.
  3045. then put the pointer in any good directory or the root to point to the new
  3046. header. Once this is done you can simply copy the file otire directory off
  3047. to floppy. If the directory or file header was just scrambled and not in a now
  3048. bad sector you can rebuild it where it is.
  3049.  
  3050. 7. Using this procedure you can recover all the files from the hard disk with
  3051. the exception of a file that now has a bad sector in the middle of the file. In
  3052. that case you must change the header to skip that sector. Sort of like
  3053. fracturing your own file.  Then you will have recovered the file minus one
  3054. sector. Reconstructing that sector may or may not be possible depending on the
  3055. file, (data, text, program etc.).
  3056.  
  3057.  Now that is the basic procedure and it has worked very well for me. The
  3058. specifics of removing pointers, rebuilding headers etc. is similar to those on
  3059. floppies. The information needed to do this is available in the HFDC manual and
  3060. in the Hard Master manual. The specifics also depend upon the actual problems
  3061. with the specific hard disk. The persons' experience with working with floppy
  3062. headers, their ability to work with hexadecimal math and their ability to
  3063. multiply alot of the hexidecimal pointers by an offset
  3064. constant to get the actual sector number (this can be confusing). If you try to
  3065. read a bad sector and get a device error you will probably have to rerun the
  3066. Hard Master program in order to continue reading sectors. (Does not recover well
  3067. from device error ie bad sector). I had to tell if to switch from HD#1 to HD#2
  3068. and then back to HD#1 to recover from error and continue. You may also
  3069. experience similar problems with other sector programs and MDM5. So it is
  3070. iportant to identify those bad sectors and make sure your software is
  3071. functioning correctly after a device error before attempting to write to the
  3072. hard disk (sector write or file copy) or yould just make things worse! When
  3073. in doubt reboot or rerun before writing. You didn't say if this hard disk was on
  3074. a 4A or a 9640 but the procedure is the same. Give me a call land line if you
  3075. need more info. I would be glad to help.
  3076.  
  3077. I'd be glad to tell you about some of the specific problems that I have had to
  3078. repair on hard disks. Once the hard disk is restored to normal ie fixed the bad
  3079. directory and files, copied everything off, reformatted, copy everything back
  3080. on, you can make it easier for future recoveries by copying sectors 0 thru 1  to
  3081. sectors 20 thru 39 (HEX of course).  This gives you a copy of all the directory
  3082. information and can be used to restore the directories to the state they were in
  3083. at the time this info was copied. Also helpful is to print out a tree listing
  3084. of all directories and files showing their sector locations etc. And of course
  3085. doing regular backups of the hard disk would be very useful! I think that
  3086. almost any hard disk could be recovered with theurse) and start
  3087. rebuilding directory headers! Well give me a call if I can be of any additional
  3088. help. Or if you need more info about Hard disks. If I can make it to the SIG
  3089. I'll try to remember to bring Hard Master also for a little demo and we can
  3090. print out a Tree listing for your hard disk just in case you ever need it.
  3091.  
  3092. =============================================================================
  3093. DTIHM027
  3094.  
  3095. CPUID & VDPID 
  3096. by Jeff White
  3097.  
  3098.  
  3099. 40176  2SEP93-2117 Communications
  3100.      RE: PC99 and TELCO (Re: Msg 40175)
  3101.      From: JHWHITE      To: MARKVC
  3102.  
  3103. To clarify that a bit, V14 is used to change the 16K page of VRAM used by the
  3104. V9938/V9958.  If data is written to page 0, which is all that exists on the
  3105. stock 99/4A, and the page is changed (only possible with V9938/V9958), the
  3106. data will not be there.  However, since the page does not change on the
  3107. 9918A, the data will be found.  The 9918A may mask V14 to V6, and V6 sets
  3108. the sprite generator table base address.  Because sprites are inactive in
  3109. the text modes which Telco uses, changes to V6 do not affect the video
  3110. display.
  3111.  
  3112. I have a more innocuous routine, called VDPID, that works on a different
  3113. principle.  The only side-effect is that the text mode and background colors
  3114. are changed, but the routine does change them to what the programmer gives
  3115. the routine.
  3116.  
  3117. Jeff
  3118.  
  3119. -*-
  3120.  
  3121. ---------------------------------------------------------------------------
  3122.  
  3123. *
  3124. *
  3125. *
  3126. *  CPU identification routine by Jeffrey H. White
  3127. *  (c) Copyright 1991
  3128. *
  3129. *  Usage:  BLWP @CPUID
  3130. *
  3131. *  Returned values in R1:  if 9900,  = 1
  3132. *                          if 9995,  = 2
  3133. *                          if 99000, = 3 (Privileged Mode)
  3134. *                                    = 4 (User Mode)
  3135. *
  3136. CPUID  DATA $-16            R8 location
  3137.        DATA CPUPC           R9 location
  3138. CPUPC  BES  12              skip over R10-R15
  3139.        LIMI 0               try to turn off interrupts
  3140.        LWPI CPUID-16-6      to preserve R13-R15, new Rx = old R(x-3)
  3141.        STST R15             store status
  3142.        SLA  R15,12          are interrupts off
  3143.        JNE  C99000          no, then definitely in 99000 User Mode
  3144.        STWP R13             store current WP
  3145.        LI   R14,CONTIN      trick with PC required by LST-less 9900
  3146.        LI   R15,>0020       after RTWP, ST10 will be 1 only on 9995/99000
  3147.        RTWP                 load ST, keep current WP, and execute next
  3148. CONTIN LI   R14,>0001       load value to return if 9900
  3149.        STST R15             ST10 was not affected by previous instruction
  3150.        SLA  R15,7           check ST7 for Privileged (Supervisor) Mode
  3151.        JLT  C99000          ST7=1 always on 99000 in User Mode
  3152.        JEQ  C9900           ST10=0 always on 9900
  3153.        MOV  @>FFFA,R15      9995 on-chip decrementer location
  3154.        AI   R15,>8000       most distant value from decrementer
  3155.        MOVB R15,@>FFFB      byte writes to 9995 decrementer mess up both
  3156.        AI   R15,>8000       restore register to previous decrementer value
  3157.        CB   R15,@>FFFA      decrementing is not fast enough for bytes to equal
  3158.        JNE  C9995           on 99000, memory or not, >FFFA will not change
  3159.        INC  R14             only executes if 99000 is found
  3160. C9995  INC  R14             only incremented once if 9995
  3161.        MOV  R15,@>FFFA      restore the value
  3162. C9900  LWPI CPUID-16        restore entry WP
  3163.        MOV  R11,@>0002(R13) put at caller R1
  3164.        RTWP                 finished
  3165. C99000 LI   R14,>0004       value returned if 99000 User Mode
  3166.        JMP  C9900           go exit
  3167.  
  3168. ------------------------------------------------------------------------------
  3169.  
  3170. *
  3171. *  VDP identification routine by Jeffrey H. White
  3172. *  (c) Copyright 1991
  3173. *
  3174. *  Usage:  BLWP @VDPID
  3175. *
  3176. *  Returned values in R1:  if 9918A, = 1
  3177. *                          if V9938, = 2
  3178. *                          if V9958, = 3
  3179. *
  3180. VDPWS  BSS  32
  3181. VDPID  DATA VDPWS
  3182.        DATA VDPPC
  3183. VDPPC  LI   R10,1
  3184.        LI   R0,>0F04
  3185.        BLWP @VWTR
  3186. VDPST  MOVB @VDPSTA,R12
  3187.        JGT  VDPST
  3188.        JEQ  V9918A
  3189.        MOVB @VDPSTA,R12
  3190.        JLT  V99X8
  3191.        JMP  V9918A
  3192. V99X8  LI   R0,>0F01
  3193.        BLWP @VWTR
  3194.        MOVB @VDPSTA,R12
  3195.        SLA  R12,5
  3196.        JLT  V9958
  3197.        JMP  V9938
  3198. V9958  INC  R10
  3199. V9938  INC  R10
  3200. V9918A LI   R0,>0F00
  3201.        BLWP @VWTR
  3202.        LI   R0,>07F4
  3203.        BLWP @VWTR
  3204.        MOV  R10,@>0002(R13)
  3205.        RTWP
  3206. *
  3207. *
  3208. ===========================================================================
  3209. DTIHM028
  3210.  
  3211. 40312 10SEP93-1251 Graphics
  3212.      bitmap mode explained again
  3213.      From: JHWHITE      To: ALL
  3214.  
  3215.  
  3216. In article <1993Sep8.013025.4524@ultb.isc.rit.edu>, digger@ritcsh.csh.rit.edu
  3217. (Sean McGranaghan) writes:
  3218. >
  3219. >       VDP Register    Value   Result
  3220. >       -------------   -----   -------------------------------------
  3221. >           r0          >02     Set Mode bit 3 for bitmaped mode
  3222. >       
  3223. >           r1          >E0     default value
  3224. >
  3225. >           r2          >06     Screen image table base address
  3226. >                               >06 * >400 = >1800
  3227. >
  3228. >           r3          >80     Color table base address
  3229. >                               >80 * >40 = >2000
  3230. >
  3231. >           r4          >00     Pattern descriptor table base address
  3232. >                               >00 * >800 = >0000
  3233. >
  3234. >           r5          >36     Sprite attribute list base address
  3235. >                               >36 * >80 = >1B00
  3236. >
  3237. >           r6          >07     Sprite descriptor table base address
  3238. >                               >07 * >800 = >3800
  3239. >
  3240. >           r7          >07     default value
  3241. >
  3242. >
  3243. >     All of this should lead to VDP memory set up as follows:
  3244. >
  3245. >       VDP Address     Table Name                      Length
  3246. >       -----------     ----------                      ------
  3247. >       >0000 - >17FF   Pattern descriptor table        >1800 bytes
  3248. >       >1800 - >1AFF   Screen image table              >300  bytes
  3249. >       >1B00 - >1B7F   Sprite attribute list           >80   bytes
  3250. >       >1B80 - >1FFF   free space                      >480  bytes
  3251. >       >2000 - >37FF   Color table                     >1800 bytes
  3252. >       >3800 - >3BFF   Sprite descriptor table         >400  bytes
  3253. >       >3C00 - >3FFF   free space                      >400  bytes
  3254.  
  3255. Sean, the E/A manual is wrong, but the 1 page addendum explains many errors
  3256. in it.  Included is the correction for bit-map mode register settings.
  3257.  
  3258. Pattern descriptor table:  at >0000-17FF,  r4 = >03
  3259.                            at >2000-37FF,  r4 = >07
  3260.  
  3261. Color table:               at >0000-17FF,  r3 = >7F
  3262.                            at >2000-37FF,  r3 = >FF
  3263.  
  3264. "Now why did TI do this?" you may ask.  The simple explanation is that the bits
  3265. in the registers correspond to video RAM address bits.  Bit 2 (bit 5 in TI's
  3266. big-endian numbering scheme) of r4 corresponds to the most significant bit of
  3267. the video RAM address.  Bit 7 (or TI's bit 0) of r3 corresponds to the most
  3268. significant bit of the video RAM address as well.
  3269.  
  3270. The value of the pattern descriptor table base address is the value in r4
  3271. of the meaningful bits shifted by 11 (or multiplied by 2048).  The color table
  3272. base address is the value in r3 of the meaningful bits shifted by 6 (or
  3273. multiplied by 64).
  3274.  
  3275. For bitmap mode, the meaningful bit of r4 gives a value of 0 or 4.  Multiply
  3276. by 2048 and you get 0 or 8192 (>0000 or >2000), respectively.  The meaningful
  3277. bit of r3 gives a value of 0 or 128.  Multiply by 64 and you get 0 or 8192
  3278. (>0000 or >2000), respectively.
  3279.  
  3280. Designing the TMS9918A (and V9938/V9958) this way simplifies the routing of the
  3281. register values to address lines on the die.  The other option would require
  3282. routing different bits of r3 and r4 as the most significant bit of the video
  3283. RAM address.
  3284.  
  3285. The "unused" bits of r3 and r4 less significant than the used bits should be
  3286. set to 1.  This is so that the address lines these less significant bits
  3287. correspond to do not have their values masked to 0.
  3288.  
  3289. When you put >00 into r4, you were making A13, A12, and A11 of the pattern
  3290. descriptor address always 0.  This meant when the VDP was fetching >0000-07FF,
  3291. it fetched the first 2048 bytes.  Also, when the VDP was fetching >0800-0FFF,
  3292. it was fetching >0000-07FF.  Likewise with >1000-17FF.
  3293.  
  3294. For the 9918A, the video address bits correspond to register bits as follows:
  3295.  
  3296.   r3 = A13 A12 A11 A10 A9 A8  A7  A6
  3297.   r4 =  0   0   0   0   0 A13 A12 A11
  3298.  
  3299. Now you can do some weird things if you know that when you set one of the
  3300. "unmeaningful" bits of r3 or r4 during bitmap mode to 0 you are in fact ANDing
  3301. the corresponding address lines when said registers are used for a display
  3302. fetch with 0, or effectively masking them to 0.  So, you can cut the color
  3303. table to 2048 bytes by setting A12 and A11 of r3 to 0, or putting the values
  3304. >1F or >9F into it depending on where you want the base address to be.
  3305.  
  3306. Using this undocumented functionality is what our good friend Eric Lafortune
  3307. did in "Rock Runner" to get great graphic effects.  I have also used this
  3308. functionality to write a 64-column terminal emulator.  With a full 6K pattern
  3309. descriptor table, and 2K color table, there is 8K of video RAM left.  This is
  3310. enough to hold 8 screen image tables which can be quickly flipped for a scroll
  3311. effect, with only the patterns for lines 7, 15, and 23 (new line) needing to
  3312. be re-drawn in the pattern descriptor table.
  3313.  
  3314. Of course, I could cut the color table down to 1K by masking an additional
  3315. address bit (A10) to 0.  In fact, I can cut it down to 64 bytes by making all
  3316. of A12 to A6 bits in r3 to 0.  Load all 64 bytes with the same two color code,
  3317. such as >1F, and the entire screen will be black and white.  However, just
  3318. defining those 64 bytes is actually just defining the colors for 8 pixel lines
  3319. of each 8 characters.
  3320.  
  3321. Isn't this all very interesting?  You can have a complete monochrome bitmap
  3322. display with 6K for patterns, 64 bytes for colors, and 768 bytes for pattern
  3323. position (screen image table).  With the fast scroll, I was using in my 64x24
  3324. column terminal emulator eight separate screen image tables which must be put
  3325. on 1K boundaries non-conflicting with pattern descriptor table or color table.
  3326.  
  3327. The pattern descriptor table is put at >0000-17FF by loading r4 with >03.  The
  3328. color table is put at >2000-203F by loading r3 with >80.  Two screen image
  3329. tables are located at >1800-1AFF (r2=>06) and >1C00-1EFF (r2=>07).  Six more
  3330. can be located at >2400-26FF (r2=>09), >2800-2AFF (r2=>0A), >2C00-2EFF (r2=>0B),
  3331. >3000-32FF (r2=>0C), >3400-36FF (r2=>0D), and >3800-3AFF (r2=>0E).
  3332.  
  3333. To do the scroll takes some fairly complex programming, but setting up the
  3334. eight screen image tables is a big and easy part of it.  The first screen
  3335. image table has >00-FF repeated three times.  The second screen image table
  3336. has >20-FF,>00-1F repeated three times.  The third screen image table has
  3337. >40-FF,>00-3F repeated three times.  See the pattern?  The eighth and last
  3338. screen image table has >E0-FF,>00-DF repeated three times.
  3339.  
  3340. The tricky part, and the part that slows the code down, is re-drawing the 8th,
  3341. 16th, and 24th lines after a screen image table page flip.  This is because
  3342. the first line in the middle third of the screen must be scrolled to the
  3343. last line of the top third of the screen.  The first line of the last third
  3344. of the screen must be scrolled to the last line middle third of the screen.
  3345. The last line of the last third of the screen must be drawn over with the
  3346. new line.
  3347.  
  3348. Of course, I have written complex code to handle all this special scrolling.
  3349. The 64 columns looks quite good with the right font.  There is sufficient
  3350. memory left of the 16K video RAM for disk I/O buffers and limited sprites.  A
  3351. TE can do without sprites (none in text mode TE's).  There would be 256 bytes
  3352. after each of the first seven alternate screen image tables.  After the color
  3353. table would be 960 contiguous bytes.  After the eighth alternate screen image
  3354. table would be 1280 contiguous bytes.  A CALL FILES(2) equivalent would have
  3355. room in that 1280 bytes to handle disk I/O.
  3356.  
  3357. Jeff White    
  3358.  
  3359. p.s.: I typed this online in the VAX/VMS line editor, so any mistakes are not
  3360. my fault.  :^)
  3361.  
  3362. -*-
  3363. =============================================================================
  3364. DTIHM029
  3365.  
  3366. From: daven@vx.cis.umn.edu (David Nieters)
  3367. Subject:v9938 Graphics 4 mode tutorial Part 1
  3368. Date: Fri, 2 Apr 1993 21:23:00 GMT
  3369. Message-ID:<2APR199316233934@vx.cis.umn.edu>
  3370.  
  3371. This is a tutorial for those of you with Geneves or 99/4A's with an
  3372. 80 column (i.e. 9938) device attached to it.  It is written for those
  3373. who want to begin to learn how to use the more advanced featues of the
  3374. V9938 that the 9918A does not offer.
  3375.  
  3376. This is a tutorial on using the V9938 in Graphics 4 mode.  In part 1,  I
  3377. will be explaining a program called LINES that was written for the 9918A
  3378. processor to demonstrate it's graphic mode.  This program came from TI with
  3379. the Mini-Memory module.  I will extend this program to use Graphics 4 mode. 
  3380. In later tutorials, we will try to increase the performance of this program
  3381. using the V9938's build in commands.
  3382.  
  3383. If there is sufficient interest, I will write parts two and three and post
  3384. them as well.
  3385.  
  3386. OVERVIEW OF GRAPHICS 4 MODE
  3387. ---------------------------
  3388.  
  3389. In Graphics 4 mode, there is no Pattern Generator Table like we have been
  3390. used to in the 9918A.  Instead, each pixel on the screen is controlled by a
  3391. 4-bit color assignment in the Pattern Name Table.  Therefore, each pixel
  3392. can be one of 16 colors and each byte in the Pattern Name Table describes
  3393. two pixels on the screen.  The screen size is either 256 X 192 or 256 X 212
  3394. pixels depending on the LN bit of VDP register 9.  Therefore, the Pattern
  3395. Name Table will be 24,576 or 27,136 bytes respectively.  The Pattern Name
  3396. Table can be located in only four areas of memory.  They are 0, >08000,
  3397. >10000, >18000.  The location is determined by Register #2.  For this
  3398. program, the Pattern Name Table will start at 0.
  3399.  
  3400. OVERVIEW OF THE LINES PROGRAM
  3401. -----------------------------
  3402.  
  3403. The lines program is in basically three parts.  One part determines where
  3404. the end points of each line will be.  It then calls another part which
  3405. draws a line between the end points.  That part then calls another routine
  3406. to plot each individual point.
  3407.  
  3408. One pitfall that I encountered early on is addressing the VDP memory.  The
  3409. 9918A had a maximum of 16KB and therefore used only 14 bits to address all
  3410. of it's memory.  The 9918A has 128KB of memory, thus needing 17 bits to
  3411. address all of its memory.  When using the standard VDP memory routines
  3412. (e.g. VSBW,VSBR,VMBW,VMBR), you can only access 16KB of memory.  As we saw
  3413. earlier, Graphics 4 mode uses over 24KB of memory.  Before using the routines
  3414. VSBW,VSBR,VMBW, and VMBR, you must make sure the three high order bits of the
  3415. address are set in VDP register 14 first.
  3416.  
  3417. Another problem I had was when writing repeatedly to VDPWD.  Each time you
  3418. write a byte of data, the VDP address gets incremented automatically.  If
  3419. you continually write past a 16KB boundry, R14 will get incremented so that
  3420. the next time you make a call ro VSBW,VSBR,VMBW, or VMBR, it is acting on a
  3421. different location in memory.  Therefore, it is important to always write to
  3422. VDP Register 14 before reading and writing VDP memory.
  3423.  
  3424. Finally, it is important to set VDP Register 14 back to zero before exiting.
  3425. If not, when the system is reset, it will begin to write in high areas of VDP
  3426. memory and your title screen will not appear right without another reset.
  3427.  
  3428. Now, on with the source code.  If there are parts that are not clear, make
  3429. a comment to me and I will try to clear it up in my next tutorial.
  3430.  
  3431.        REF  VWTR,VSBW,VMBW,KSCAN,VSBR
  3432.        REF  VDPWD,VDPWA,VDPSTA
  3433.  
  3434. HEIGHT EQU  212          NUMBER OF LINES
  3435. NUMLIN EQU  100          NUMBER OF LINES WE DRAW BEFORE ERASING SCREEN
  3436.  
  3437.  
  3438. * CLEAR THE SCREEN
  3439. *
  3440. * THIS ROUTINE CLEARS THE SCREEN BY WRITING ZEROS IN THE
  3441. * PATTERN NAME TABLE.  WHEN DEALING WITH THE LARGER MEMORY
  3442. * SPACE OF THE V9938, WE HAVE TO BE SURE THAT REGISTER #14
  3443. * IS CLEARED BEFORE WE START.  OTHERWISE WE MIGHT BY ZEROING
  3444. * OUT HIGHER AREAS OF MEMORY THAN WE WANT TO.
  3445. CLEAR  LI   R0,>0E00     RESET OUR VDP ADDRESS
  3446.        BLWP @VWTR
  3447.        LI   R0,>0040
  3448.        MOVB R0,@VDPWA
  3449.        SWPB R0
  3450.        MOVB R0,@VDPWA
  3451.        LI   R2,HEIGHT*128  WE WILL WRITE 24,576 ZEROS
  3452.        CLR  R0
  3453. CLEAR1 MOVB R0,@VDPWD
  3454.        DEC  R2
  3455.        JNE  CLEAR1
  3456.        RT
  3457.  
  3458. * RANDOM NUMBER GENERATOR
  3459. *
  3460. * THIS PROCEDURE RETURNS A (NOT SO) RANDOM NUMBER IN R1.
  3461. * IT ENSURES THE RANDOM NUMBER WILL NOT BE 0.
  3462. *
  3463. RAND   MOV  @SEED,R1
  3464. RAND1  AI   R1,>1D6B
  3465.        JEQ  RAND1
  3466.        MOV  R1,@SEED
  3467.        RT
  3468.  
  3469. SEED   DATA >690A
  3470.  
  3471. DX1    DATA 0           THESE LOCATIONS ARE USED TO STORE
  3472. DX2    DATA 0           HOW FAR THE ENDPOINTS MOVE EACH
  3473. DY1    DATA 0           TIME A LINE IS DRAWN
  3474. DY2    DATA 0
  3475.  
  3476. * COLOR FLAG
  3477. *
  3478. * WHEN COLOR FLAG IS ZERO, THE LINES WILL APPEAR IN
  3479. * DIFFERENT COLORS.  WHEN IT IS NOT SET TO ZERO, ALL
  3480. * LINES WILL BR DRAWN IN THE SAME COLOR.  IT'S TOGGLED
  3481. * BY PRESSING THE 'C' WHILE LINES ARE BEING DRAWN.
  3482. *
  3483. CFLAG  DATA 0
  3484.  
  3485. * POINT
  3486. *
  3487. * POINT WILL TAKE AN X COORDINATE IN R0 AND A Y
  3488. * COORDINATE IN R1 AND A COLOR IN R2 AND PLOT THAT
  3489. * POINT ON THE SCREEN
  3490. *
  3491. POINT  SLA  R1,8        COMPUTE OFFSET IN PATTERN NAME TABLE
  3492.        A    R1,R0
  3493.        SRL  R0,1
  3494.        JOC  POINT1      SEE IF LEFT HAND OR RIGHT HAND
  3495.        LI   R3,>F000
  3496.        MOV  R2,R4
  3497.        SLA  R4,12
  3498.        JMP  POINT2
  3499. POINT1 LI   R3,>0F00
  3500.        MOV  R2,R4
  3501.        SLA  R4,8
  3502. POINT2 MOV  R0,R2
  3503.        ANDI R0,>C000    WRITE UPPER 2 BITS OF ADDRESS
  3504.        SRL  R0,14       TO VDP REGISTER 14
  3505.        ORI  R0,>0E00
  3506.        BLWP @VWTR
  3507.        MOV  R2,R0
  3508.        ANDI R0,>3FFF
  3509.        BLWP @VSBR       READ BYTE ALREADY THERE
  3510.        SZCB R3,R1       CLEAR OUT OLD COLOR
  3511.        SOCB R4,R1       PUT IN NEW COLOR
  3512.        BLWP @VSBW       REWRITE OUT TO THE SCREEN
  3513.        RT
  3514.  
  3515. * PLOT
  3516. *
  3517. * THIS ROUTINE PLOTS A LINE FROM (X1,Y1) TO (X2,Y2)
  3518. * THESE COORDINATES ARE LOCATED IN THE CALLERS
  3519. * REGISTERS R6,R7,R8 AND R9.  THE COLOR IS
  3520. * SPECIFIED IN THE CALLER'S R10.
  3521. *
  3522. PLOT   DATA >8300
  3523.        DATA PLOT1
  3524.  
  3525. PLOT1  CLR  R12
  3526.        LI   R5,1
  3527.        LI   R6,1
  3528.        MOV  @16(R13),R7
  3529.        MOV  @12(R13),R9
  3530.        S    R9,R7
  3531.        JLT  PLOT11
  3532.        JMP  PLOT2
  3533. PLOT11 NEG  R7
  3534.        NEG  R5
  3535. PLOT2  MOV  R7,R7
  3536.        JNE  PLOT3
  3537.        SETO R12
  3538. PLOT3  MOV  @18(R13),R8
  3539.        MOV  @14(R13),R10
  3540.        S    R10,R8
  3541.        JLT  PLOT4
  3542.        JMP  PLOT5
  3543. PLOT4  NEG  R6
  3544.        NEG  R8
  3545. PLOT5  MOV  R9,R0
  3546.        MOV  R10,R1
  3547.        MOV  @10(R13),R2  GET COLOR
  3548.        BL   @POINT
  3549.        C    R9,@16(R13)
  3550.        JNE  PLOT6
  3551.        C    R10,@18(R13)
  3552.        JNE  PLOT6
  3553.        RTWP
  3554.  
  3555. PLOT6  MOV  R12,R12
  3556.        JLT  PLOT7
  3557.        A    R5,R9
  3558.        S    R8,R12
  3559.        JMP  PLOT5
  3560. PLOT7  A    R6,R10
  3561.        A    R7,R12
  3562.        JMP  PLOT5
  3563.  
  3564. * MAIN PROGRAM
  3565. *
  3566. START  LWPI >8320
  3567.        LI   R2,VDPREG    SET VDP REGISTERS
  3568. L1     MOV  *R2+,R0
  3569.        JLT  L2
  3570.        BLWP @VWTR
  3571.        JMP  L1
  3572.        BL   @CLEAR       CLEAR THE SCREEN
  3573.  
  3574.        CLR  @CFLAG
  3575.        CLR  R3           R3 COUNTS THE NUMBER OF LINES WE HAVE DRAWN
  3576.  
  3577.        LI   R6,>80       SET THE ENDPOINTS FOR OUR FIRST LINE
  3578.        LI   R7,>60
  3579.        LI   R8,>D3
  3580.        LI   R9,>13
  3581.  
  3582.        CLR  R0           SET THE INITIAL AMOUNTS THE ENDPOINTS
  3583.        INCT R0           MOVE BY
  3584.        MOV  R0,@DX1
  3585.        INCT R0
  3586.        MOV  R0,@DY1
  3587.        INCT R0
  3588.        MOV  R0,@DX2
  3589.        INCT R0
  3590.        MOV  R0,@DY2
  3591. LOOP   MOV  @CFLAG,R0
  3592.        JNE  L5
  3593.        BL   @RAND       PICK A RANDOM COLOR
  3594.        ANDI R1,>F
  3595.        MOV  R1,R5
  3596.        CI   R5,2        MAKE SURE WE DON'T HAVE BLACK
  3597.        JHE  L5
  3598.        ORI  R5,2
  3599. L5     A    @DX1,R6     MOVE THE ENDPOINTS
  3600.        A    @DY1,R7
  3601.        A    @DX2,R8
  3602.        A    @DY2,R9
  3603.  
  3604. * CHECK TO MAKE SURE THAT NO ENDPOINTS HAVE MOVED OFF
  3605. * THE SCREEN.  IF SO, REVERSE ITS DIRECTION.
  3606. *
  3607.        MOV  R6,R6
  3608.        JLT  L6
  3609.        CI   R6,>100
  3610.        JLT  L7
  3611. L6     NEG  @DX1
  3612.        A    @DX1,R6
  3613.  
  3614. L7     MOV  R8,R8
  3615.        JLT  L8
  3616.        CI   R8,>100
  3617.        JLT  L9
  3618. L8     NEG  @DX2
  3619.        A    @DX2,R8
  3620.  
  3621. L9     MOV  R7,R7
  3622.        JLT  L10
  3623.        CI   R7,HEIGHT
  3624.        JLT  L11
  3625. L10    NEG  @DY1
  3626.        A    @DY1,R7
  3627. L11    MOV  R9,R9
  3628.        JLT  L12
  3629.        CI   R9,HEIGHT
  3630.        JLT  L13
  3631. L12    NEG  @DY2
  3632.        A    @DY2,R9
  3633.  
  3634. L13    BLWP @PLOT
  3635.  
  3636. L14    CLR  R0           CHECK TO SEE IF A KEY IS PRESSED
  3637.        MOVB R0,@>8374
  3638.        BLWP @KSCAN
  3639.        MOVB @>8375,R0
  3640.        MOVB @>837C,R1
  3641.        JEQ  L16
  3642.        CI   R0,>0500     CHECK FOR QUIT KEY
  3643.        JNE  L15
  3644.        B    @QUIT
  3645. L15    CI   R0,>4300     CHECK FOR "C" KEY PRESSED
  3646.        JNE  L14
  3647.        INV  @CFLAG       TOGGLE THE COLOR FLAG
  3648. L16    CI   R0,>FF00
  3649.        JNE  L14
  3650.        INC  R3
  3651.        CI   R3,NUMLIN    SEE IF WE HAVE MORE LINES TO DRAW
  3652.        JNE  LOOP         IF SO, GO BACK AND DRAW THEM
  3653.  
  3654.        CLR  R3
  3655.        LI   R2,10
  3656.        LI   R4,>FFFF
  3657. DLY    DEC  R4           WAIT A LITTLE BEFORE CLEARING THE SCREEN
  3658.        JNE  DLY
  3659.        DEC  R2
  3660.        JNE  DLY
  3661.  
  3662.        BL   @RAND        COMPUTE NEW RANDOM MOVEMENTS
  3663.        MOV  R1,R1
  3664.        JLT  L17
  3665.        ANDI R1,7
  3666.        JMP  L18
  3667. L17    ORI  R1,>FFF8
  3668. L18    MOV  R1,@DX2
  3669.        BL   @RAND
  3670.        MOV  R1,R1
  3671.        JLT  L19
  3672.        ANDI R1,7
  3673.        JMP  L20
  3674. L19    ORI  R1,>FFF8
  3675. L20    MOV  R1,@DY1
  3676.        BL   @RAND
  3677.        MOV  R1,R1
  3678.        JLT  L21
  3679.        ANDI R1,7
  3680.        JMP  L22
  3681. L21    ORI  R1,>FFF8
  3682. L22    MOV  R1,@DX1
  3683.        BL   @RAND
  3684.        MOV  R1,R1
  3685.        JLT  L23
  3686.        ANDI R1,7
  3687.        JMP  L24
  3688. L23    ORI  R1,>FFF8
  3689. L24    MOV  R1,@DY2
  3690.  
  3691.        BL   @CLEAR       CLEAR SCREEN
  3692.        B    @LOOP        START OVER
  3693.  
  3694. QUIT   LI   R2,REG2      RESTORE VDP REGISTERS BACK TO NORMAL
  3695. QUIT1  MOV  *R2+,R0
  3696.        JLT  QUIT2
  3697.        BLWP @VWTR
  3698.        JMP  QUIT1
  3699. QUIT2
  3700.        LIMI 2
  3701.        BLWP @0
  3702.  
  3703. * VDP REGISTERS TO SET VDP TO GRAPHICS 4 MODE
  3704. VDPREG DATA >0006
  3705.        DATA >0160
  3706.        DATA >021F        LOCATE NAME TABLE AT ADDRESS 0
  3707.        DATA >0711        SET BACKGROUND TO BLACK
  3708.        DATA >080A        INHIBIT SPRITES
  3709.        DATA >0980        212 LINES
  3710.        DATA >FFFF
  3711.  
  3712. * VDP REGISTERS WHEN WE EXIT
  3713. *
  3714. REG2   DATA >0000
  3715.        DATA >0F00
  3716.        DATA >01F0
  3717.        DATA >0200
  3718.        DATA >03FF
  3719.        DATA >0401
  3720.        DATA >0560
  3721.        DATA >0E00
  3722.        DATA >FFFF
  3723.  
  3724.        END  START
  3725.  
  3726. =============================================================================
  3727. DTIHM030
  3728.  
  3729. In search of.... Leading Edge Connectors. 
  3730. by Dan H. Eicher
  3731.  
  3732. A  while back I was sourcing parts to finish a 99/8 P-Box interface card.
  3733. For those  of you who have looked at your cards,  you may have noticed at
  3734. one  point or another certain cards having a black plastic edge connector.
  3735.  
  3736. These are sort of rare.   These connectors are called TI Leading Edge
  3737. Connectors.  They provide an  alternative  to  just making and edge connector
  3738. by printing  traces  on  the bottom of the PCB.  
  3739.  
  3740. For  a  while TI was pushing these connectors on the electronics  industry,
  3741. of course  these  connectors never gained much popularity in the  consumer
  3742. market, because  no one wanted to spend the few extra cents for quality 
  3743. goods.  
  3744.  
  3745. Note: These connectors are built to very high standards,  they will survive
  3746. many insert/extraction  cycles  and are designed to give maximum  conductivity
  3747. in  a variety  of  situations.   These connectors are also gold plated,  as
  3748. all  good connectors should be.
  3749.  
  3750. **** End of editorial ****
  3751.  
  3752. Well I needed to buy one of these to finish my 99/8 interface card.   Well
  3753. after some calls to my local suppliers, Newark, Jameco ect... I came up
  3754. empty.....
  3755.  
  3756. Well  after  many MANY phone calls I got a hold of the TI  division  that
  3757. makes these  connectors.   When I called six months ago,  they were on the
  3758. list to  be obsoleted,  but were still available.  So if you want any of
  3759. these connectors to repairs boards or place in your stock, you had better
  3760. call now....
  3761.  
  3762. TI Part # L2111121-30 and the person to call is:            
  3763. Sue Rodgers 508.236.5375
  3764.  
  3765. Hope that this can save someone sometime!
  3766.  
  3767. Dano             
  3768. L.D.O.M. 06.27.95
  3769. ===========================================================================
  3770. DTIHM031
  3771.  
  3772. Modify the Rave Speech Card and MBP Card for use with the Geneve.
  3773. by Beery Miller
  3774.  
  3775.  
  3776. Item    7747642                 94/05/05        23:20
  3777. From:   BW.MILLER                       Beery W. Miller
  3778. To:     BW.MILLER                       Beery W. Miller
  3779.         COMP.SYS.TI.USENET@GATEKEEPER.DEC.COM@INET#
  3780.  
  3781. Sub: To: Markus Kraemer
  3782.  
  3783. Markus, here are the mods to the Rave Speech card and the MBP that permits
  3784. full decoding of those cards to work with the Geneve.  Any Geneve using one
  3785. of those cards without these mods are subject to PROBLEMS, PROBLEMS,
  3786. PROBLEMS.
  3787.  
  3788. The mods for the Geneve compatibility is as follows:
  3789.  
  3790. Solder pins 8 and pins 16 of a 74LS138 to pins 8 and 16 of 74LS138 on the
  3791.  card (this is for +5 volts and ground only, you may use another source if
  3792.  available), i.e. piggyback the chips.
  3793.  
  3794. Now for the decoding mod that properly decodes the Rave Speech card and the
  3795.  MBP card for full Geneve Compatibility (these devices will only respond at
  3796.  page >BC)
  3797.  
  3798. Cut the trace of pin 56 on the card near the bus connector
  3799.  
  3800. Pins of 74LS138
  3801.  _____________________________________________________________-
  3802.  
  3803.  1 Connect to bus pin 46
  3804.  2 Connect to bus pin 45
  3805.  3 Connect to bus pin 48
  3806.  4 Connect to bus side of bus pin 56
  3807.  5 Connect to bus pin 8
  3808.  6 Connect to bus pin 9
  3809.  7 Connect to component side of bus pin 56
  3810.  8 Connect to pin 8 of 74LS138
  3811.  16 Connect to pin 16 of 74LS138
  3812.  
  3813. (pins 9 through 15 are left disconnected)
  3814.  
  3815. These modifications are done at your own risk.  You assume all responsibilty
  3816.  for performing these modifications.
  3817.  
  3818. ==========================================================================
  3819. DTIHM032
  3820.  
  3821. Here is the pin definition for the new Rave expansion box.
  3822. For further information you can contact:
  3823.  
  3824. RAVE 99 Co.
  3825. Attn: John McDevitt
  3826. 112 Rambling Road
  3827. Vernon, CT 06066
  3828. (203)-871-7824
  3829.  
  3830. I have "transcribed" this information from the manual that comes with
  3831. the Rave p-box. Any errors are my own. Hope this information helps.
  3832.  
  3833. Dan H. Eicher
  3834. Delphi: EICHER
  3835.   
  3836. Looking into connector from the component side - pin 1 towards rear of
  3837. chassis.
  3838.                                     ____
  3839. Plus 12 Volts Reg.     +12V     2 =    =  1  +12V     Plus 12 Volts Reg.
  3840. Ready A                READY A  4 =    =  3  GND      Logic Ground
  3841. Computer Reset         RESET    6 =    =  5  GND      Logic Ground
  3842. System Clock           SCLK     8 =    =  7  GND      Logic Ground
  3843. Audio                  AUDIO   10 =    =  9  LCP      CPU Indicator
  3844. PCB Enable             PCBEN   12 =    = 11  RBDENA   Remote Data Bus Control
  3845. IAQ Hold A             IAQHA   14 =    = 13  HOLD     CPU Hold Request
  3846. Inter. Level B         SENILB  16 =    = 15  SENILA   Inter. Level A Sense Enabl
  3847. Load Interrupt         LOAD    18 =    = 17  INTA     Inter. Level A
  3848. Logic Ground           GND     20 =    = 19  D7       System Data Bit 7
  3849. System Data Bit 6      D6      22 =    = 21  D5       System Data Bit 5
  3850. System Data Bit 4      D4      24 =    = 23  D3       System Data Bit 3
  3851. System Data Bit 2      D2      26 =    = 25  D1       System Data Bit 1
  3852. System Data Bit 0      D0      28 =    = 27  GND      Logic Ground
  3853. System Address Bit 15  A15/CRU 30 =    = 29  A14      System Address Bit 14
  3854. System Address Bit 13  A13     32 =    = 31  A12      System Address Bit 12
  3855. System Address Bit 11  A11     34 =    = 33  A10      System Address Bit 10
  3856. System Address Bit 09  A09     36 =    = 35  A08      System Address Bit 08
  3857. System Address Bit 07  A07     38 =    = 37  A06      System Address Bit 06
  3858. System Address Bit 05  A05     40 =    = 39  A04      System Address Bit 04
  3859. System Address Bit 03  A03     42 =    = 41  A02      System Address Bit 02
  3860. System Address Bit 01  A01     44 =    = 43  A00      System Address Bit 00
  3861. System Address Bit A   AMA     46 =    = 45  AMB      System Address Bit B
  3862. System Address Bit C   AMC     48 =    = 47  GND      Logic Ground
  3863. CPU Clock              CLKOUT  50 =    = 49  GND      Logic Ground
  3864. DATA Bus Direction     DBIN    52 =    = 51  CRUCLK   CRU Clock
  3865. CPU Write Enable       WE      54 =    = 53  GND      Logic Ground
  3866. Memory Request         MEMEN   56 =    = 55  CRUIN    CRU Input Data
  3867. Minus 12 Volts Reg.    -12V    58 =    = 57  -12V     Minus 12 Volts Reg.
  3868. Plus 12 Volts Reg.     +12V    60 =    = 59  +12V     Plus 12 Volts Reg.
  3869.                                    ----
  3870.  
  3871.                                    ____
  3872. Plus 5 Volts Reg.      +5v      2 =    =  1  +5V      Plus 5 Volts Reg.
  3873. Minus 12 Volts Reg.    -12v     4 =    =  3  -12V     Minus 12 Volts Reg.
  3874. Sound Out Geneve       SNDOUTG  6 =    =  5  GENSEL   Geneve/4A Select Line
  3875. Key Lock Switch        KEYLSW   8 =    =  7  VIDOUTG  Video Out Geneve
  3876. Extra Bit #10          XB10    10 =    =  9  XB9      Extra Bit #9
  3877. System Address Bit G   AMG     12 =    = 11  AMF      System Address Bit F
  3878. System Address Bit I   AMI     14 =    = 13  AMH      System Address Bit H
  3879. System Address Bit K   AMK     16 =    = 15  AMJ      System Address Bit J
  3880. System Address Bit M   AMM     18 =    = 17  AML      System Address Bit L
  3881. Logic Ground           GND     20 =    = 19  D15      System Data Bit 15
  3882. System Data Bit 14     D14     22 =    = 21  D13      System Data Bit 13
  3883. System Data Bit 12     D12     24 =    = 23  D11      System Data Bit 11
  3884. System Data Bit 10     D10     26 =    = 25  D9       System Data Bit 09
  3885. System Data Bit 08     D8      28 =    = 27  GND      Logic Ground
  3886. Keyboard Data Geneve   KBDAT   30 =    = 29  KBCLK    Keyboard Clock Geneve
  3887. Turbo Switch           TURBO/SW32 =    = 31  RESETSW  Reset Switch
  3888. Minus 5 Volts Reg.     -5V     34 =    = 33  -5V      Minus 5 Volts Reg.
  3889. Plus 12 Volts Reg.     +12V    36 =    = 35  +12V     Plus 12 Volts Reg.
  3890.                                    ----
  3891.  
  3892. The following is an editors note:
  3893.  
  3894. For comparision the max for the different voltage lines on a "typical"
  3895. IBM type 200 watt switching power supply is:
  3896.  
  3897. +5V     20A
  3898. -5V    0.5A
  3899. +12V     8A
  3900. -12V   0.5A
  3901.  
  3902. The "Standard" TI power supply has the following ratings (per the
  3903. Bunyard Manual):
  3904.  
  3905. .5  Amps per card slot is available from the  +5V
  3906. .25  "    "   "    "   "      "      "    "  +12V
  3907. 50  ma    "   "    "   "      "      "    "  -12V
  3908.  
  3909. These calculations include a debit for the internal disk drive
  3910. from the power supplies total capability.
  3911.  
  3912. ==============================================================================
  3913.  
  3914. DTIHM033
  3915.  
  3916. TI-99/4 - THE EARLY DAYS
  3917.    by Chuck Neal 
  3918. Portland Users Ninety Niners
  3919.  
  3920. Here  is  an interesting bit of TI history that came over the UNIX user  net  at
  3921. work.   I rearranged some of the material for clarity.  The contributor of  this
  3922. article was Herbert H.  Taylor of the David Sarnoff Research Center.  It appears
  3923. that he worked at Texas Instruments back in the late 1970's when the TI-99  "Was
  3924. Happening."
  3925.  
  3926. First  you will find out what the "pack-man door" on your speech synthesizer  is
  3927. for (was for!).  Next he talks about some mysterious "wireless peripherals" that
  3928. the TI 99/4 almost had.  Then the replacement of the 9985 microprocessor by  the
  3929. 9900 and the suggestion that there are a lot more intersting stories waiting  to
  3930. be told!
  3931.  
  3932. The last part of the article goes into the history of the RF modulator.  In  the
  3933. early  days you had to hook your TI into a television set,  and television  sets
  3934. don't have audio and video inputs -  they have radio frequency inputs.   (Except
  3935. for  some  of  the  new  ones).  So the RF modulator  is  like  a  miniature  TV
  3936. broadcasting station, broadcasting on channel 3.  
  3937.  
  3938. SPEECH SYNTHESIZER
  3939.  
  3940. The  plug-in  port  on the speech module was intended to expand  the  number  of
  3941. permanent  words  of vocabulary as in Speak-N-Spell.  When TE-II  worked  better
  3942. than expected,  TI lost interest in expansion modules.  It is possible that only
  3943. the first few thousand speech modules have the "hooks" for those modules.  I own
  3944. several vintage speech modules and they all have the hooks,  but I never got any
  3945. plug-in modules and I designed the interface...(Please,  no questions, it's been
  3946. 11 years!)
  3947.  
  3948. WIRELESS PERIPHERALS
  3949.  
  3950. Another  historical  note: the first few thousand orginal 99/4's  had  a  hidden
  3951. plug  in  slot on the top flat surface ( under the metal overlay)  for an  IR  (
  3952. Infer-Red  )   remote  control transmitter/receiver about the size  of  a  Kodak
  3953. Instamatic.   This  device  supported  a number  of  never  introduced  wireless
  3954. peripherals - including a wireless "super" keyboard and joystick. 
  3955.  
  3956. The  wireless peripherals were supported on the systems shown at the  June  1979
  3957. CES show in Chicago.  Ten minutes before the introductory press conference,   we
  3958. were  told "...not to show the peripherals..." In any event I am fairly  certain
  3959. the  software support for these peripherals was left in GROM -  at  least  until
  3960. the  switch  to  the 99/4A,  which included the new  (actually  the  "original")
  3961. keyboard. 
  3962.  
  3963. These  peripherals were never introduced because TI thought that they  were  too
  3964. expensive  for a Home Computer with an intended 1979 price of uner $100.   (When
  3965. Apple was $2000)  When the price "skyrocketed" to $1000,  it was supposedly "too
  3966. late" to bring out the wireless peripherals. 
  3967.  
  3968. The  price  increase  was  due to the complete  failure  of  the  cheap  TMS9985
  3969. microprocessor orginally designed into the 99/4.  This resulted in changing over
  3970. to  a very expensive goldlead ceramic packaged TMS9900,  a TTL clock driver,   a
  3971. 256  byte static RAM,  and a ton of TTL glue logic.  (The true story of how  the
  3972. 9900 ended up in the 99/4 would rival General Hospital!)
  3973.  
  3974. VIDEO MODULATOR
  3975.  
  3976. Also the first few hundred units had the "hooks" to bring in external video  and
  3977. genlock  the TMS9918 -  a capability which even today is not generally found  in
  3978. personal computers.  This was removed from the connector (despite its less  than
  3979. $1.00  cost  in  parts)   because at the time of  the  99/4  introduction,   the
  3980. interface  had  not  been  tested sufficiently and  there  was  still  too  much
  3981. unvertainty about the FCC implications of genlocking a class 1 TV device. 
  3982.  
  3983. Remember  at the time (1979),  any TV game or computer that had an RF  modulator
  3984. had  to  pass  very strict FCC testing.  The 99/4 orginally had  a  built-in  RF
  3985. modulator,   which  was removed shortly before the June 1979 CES show  when  the
  3986. decision was made to package the 99/4 with the Zenith color monitor. 
  3987.  
  3988. In  1978  we built 200 prototype 99/4's with built-in RF modulators and  a  9900
  3989. "emulation"  of the 9985 on a 9"x4" board sandwhiched onto the original PWB  and
  3990. crammed  into  the orginal 99/4 tooled case.  These 200 units were given  to  TI
  3991. executives and board members to play with for six months.  I have a wire-wrapped
  3992. proto type with one of the few 9985's ever produced,  but I would be  interested
  3993. in acquiring any of the 200 prototypes which might be existant. 
  3994.  
  3995. Everyone  was  quite  shocked when the FCC ruled in  TI's  favor.   That  ruling
  3996. distinguished personal computers from video games. 
  3997.  
  3998. The decision to remove the RF modulator from the console was initiated when  the
  3999. FCC  agreed  to test a fiber optic interface we had developed.   This  optically
  4000. coupled the computer console with a standalone RF modulator.  This interface was
  4001. dubbed  the  "video  light pipe".  After the system was sent  to  the  FCC  they
  4002. returned  in  UNTESTED,  stating that they could not accept petitions  for  rule
  4003. making to modify existing rules. The rest is history. 
  4004.  
  4005. L.D.O.M. 11.25.94
  4006. ==============================================================================
  4007. DTIHM034
  4008.  
  4009. 9900,9901,9902,9904 by Definitions
  4010. by Dan Eicher
  4011.  
  4012.  
  4013.                 ___ ___
  4014.         VBB 01 =|  U  |= 64 HOLD -      * Note Pins with a - before or
  4015.         VCC 02 =|     |= 63 MEMEN -       after them represent active 
  4016.        WAIT 03 =|  T  |= 62 READY         lows.
  4017.       -LOAD 04 =|  M  |= 61 WE
  4018.       HOLDA 05 =|  S  |= 60 CRUCLK
  4019.      -RESET 06 =|     |= 59 VCC
  4020.         IAQ 07 =|  9  |= 58 NC
  4021.          u1 08 =|  9  |= 57 NC
  4022.          u2 09 =|  0  |= 56 D15
  4023.         A14 10 =|  0  |= 55 D14
  4024.         A13 11 =|     |= 54 D13
  4025.         A12 12 =|     |= 53 D12 
  4026.         A11 13 =|     |= 52 D11
  4027.         A10 14 =|     |= 51 D10
  4028.         A09 15 =|     |= 50 D09
  4029.         A08 16 =|     |= 49 D08
  4030.         A07 17 =|     |= 48 D07
  4031.         A06 18 =|     |= 47 D06
  4032.         A05 19 =|     |= 46 D05
  4033.         A04 20 =|     |= 45 D04
  4034.         A03 21 =|     |= 44 D03
  4035.         A02 22 =|     |= 43 D02
  4036.         A01 23 =|     |= 42 D01
  4037.         A00 24 =|     |= 41 D00
  4038.          u4 25 =|     |= 40 VSS
  4039.         VSS 26 =|     |= 39 NC
  4040.         VDD 27 =|     |= 38 NC
  4041.          u3 28 =|     |= 37 NC
  4042.        DBIN 29 =|     |= 36 IC0
  4043.      CRUOUT 30 =|     |= 35 IC1
  4044.       CRUIN 31 =|     |= 34 IC2
  4045.     -INTREQ 32 =|_____|= 33 IC3
  4046.                
  4047.                 ___ ___
  4048.        RST1 01 =|  U  |= 40 VCC
  4049.      CRUOUT 02 =|     |= 39 S0
  4050.      CRUCLK 03 =|  T  |= 38 P0
  4051.       CRUIN 04 =|  M  |= 37 P1
  4052.         -CE 05 =|  S  |= 36 S1
  4053.       -INT6 06 =|     |= 35 S2
  4054.       -INT5 07 =|  9  |= 34 -INT7/+P15
  4055.       -INT4 08 =|  9  |= 33 -INT8/+P14
  4056.       -INT3 09 =|  0  |= 32 -INT9/+P13
  4057.          -u 10 =|  1  |= 31 -INT10/+P12
  4058.      INTREQ 11 =|     |= 30 -INT11/+P11
  4059.         IC3 12 =|     |= 29 -INT10/+P10
  4060.         IC2 13 =|     |= 28 -INT09/+P09
  4061.         IC1 14 =|     |= 27 -INT08/+P08
  4062.         IC0 15 =|     |= 26 P2
  4063.         VSS 16 =|     |= 25 S3
  4064.       -INT1 17 =|     |= 24 S4
  4065.       -INT2 18 =|     |= 23 -INT15/+P7
  4066.          P6 19 =|     |= 22 P3
  4067.          P5 20 =|     |= 21 P4
  4068.                 -------
  4069.                 ___ ___
  4070.        -INT 01 =|  U  |= 18 VCC    Note: This chip can be replaced with
  4071.        XOUT 02 =|  T  |= 17 -CE          a 9903. The 9903 is identical
  4072.         RIN 03 =|  M  |= 16 -u           except it also includes the 
  4073.       CRUIN 04 =|  S  |= 15 CRUCLK       ability to handle sync. commun-
  4074.        -RTS 05 =|     |= 14 S0           ication.
  4075.        -CTS 06 =|  9  |= 13 S1
  4076.        -DSR 07 =|  9  |= 12 S2
  4077.      CRUOUT 08 =|  0  |= 11 S3
  4078.         VSS 09 =|  2  |= 10 S4
  4079.                 -------
  4080.                 ___ ___
  4081.       TANK1 01 =|  U  |= 20 VCC    Note: This chip is also called a 
  4082.       TANK2 02 =|  T  |= 19 XTAL2        74LS
  4083.        GND1 03 =|  M  |= 18 XTAL1
  4084.         FFQ 04 =|  S  |= 17 OSCIN
  4085.         FFD 05 =|     |= 16 OSCOUT
  4086.      u4 TTL 06 =|  9  |= 15 TTL u2
  4087.      u3 TTL 07 =|  9  |= 14 TTL u3
  4088.          u3 08 =|  0  |= 13 VDD
  4089.          u4 09 =|  4  |= 12 u1
  4090.         GND 10 =|     |= 11 u2
  4091.                 -------
  4092.  
  4093. =============================================================================
  4094. DTIHM035
  4095.  
  4096. Console Connectors
  4097. by Thierry Norspikel
  4098.  
  4099.  
  4100. From: Thierry Nouspikel <nouspike@cmu.unige.ch>
  4101. Subject: Re: Article.
  4102. In-reply-to: <01ICOTL7T8WY973IFF@delphi.com>
  4103.  
  4104. CASSETTE TAPE FORMAT
  4105.  
  4106. Name     # of bytes Content
  4107. ----------------------------
  4108.  
  4109. File sync    768    >00
  4110. Data mark      1    >FF
  4111. Size           1    # of records
  4112. Repeat size    1    dito
  4113. Rec sync       8    >00                       }
  4114. Data mark      1    >FF                       } Rec 1
  4115. Data          64    data bytes                }
  4116. Checksum       1    sum of the 64 data bytes  }
  4117.  
  4118. Repeat rec 1
  4119. Rec 2
  4120. Repeat rec 2
  4121. etc.
  4122.  
  4123. Bits are encoded by output level CHANGES.
  4124. With a 3 MHz console, clock ticks toggle output every 725.3 microseconds.
  4125. To encode a 1 invert the output in the middle of this time period.
  4126.  
  4127. This results in frequencies of 689.37 Hz for a space (0) and 1379 Hz for a
  4128. mark (1)
  4129.  
  4130. which is well within the audio range, thus suitable for a tape player.
  4131.  
  4132.  
  4133.   0  _1  _0_  1_    Bits to encode
  4134. !___! !_!   !_! !_  Output (low/high)
  4135. c   c   c   c   c   Clock intervals
  4136.  
  4137. NB: Upon writing, the timing is ensured by loading >0011 into the clock
  4138. register of the TMS9901 chip. The resulting delay is 17 / (3MHz/64)=363.6 usec
  4139.  
  4140.     Upon reading, the stretches of zeros are used to time the tape
  4141. recorder and this value is fed into the TMS9901 for further reading.
  4142.  
  4143. -------------------------------------------------------------------------------
  4144.  
  4145. WHAT'S THE PINOUT OF THE ..... CONNECTOR ?
  4146.  
  4147. Replace the ..... with: Joystick port, Cassette port, Main power port,
  4148. Monitor port, Cartridge port, Peripheral port, Keyboard connector (internal)
  4149. or Card slots (in PE box).
  4150.  
  4151. These informations have been extracted from:
  4152.       TI-99/4A Console
  4153.             and
  4154.  Peripheral Expansion System
  4155.        Technical Data
  4156.  
  4157. a very usefull handbook published by TI in 1983, with many informations,
  4158. timing diagrams, console schematics, etc.
  4159.  
  4160.                  ___________
  4161. Joystick port:  ( 1 2 3 4 5 )
  4162. =============    \ 6 7 8 9 /
  4163. #  I/O  Use       \_______/
  4164. -----------
  4165. 1       not used
  4166. 2   >   Test joystick 2
  4167. 3   <   Up
  4168. 4   <   Fire button pressed
  4169. 5   <   Left
  4170. 6       not used
  4171. 7   >   Test joystick 1
  4172. 8   <   Down
  4173. 9   <   Right
  4174.  
  4175.  
  4176.                  ___________
  4177. cassette port:  ( 1 2 3 4 5 )
  4178. ==============   \ 6 7 8 9 /
  4179. #  I/O  Use       \_______/
  4180. -----------
  4181. 1   >   Cass 1 motor control   (CRU bit 22)
  4182. 2   >   Dito (neg)
  4183. 3   >   Output to tape 2       (CRU bit 25)
  4184. 4   >   Audio gate             (CRU bit 24)
  4185. 5   >   Output to tape 2 (neg)
  4186. 6   >   Cass 2 motor control   (CRU bit 23)
  4187. 7   >   Dito (neg)
  4188. 8   <   Input from tape 1 or 2 (CRU bit 27)
  4189. 9   <   Dito (neg)
  4190.  
  4191. N.B. Cassette 1 can't be written to.
  4192.  
  4193. Power port:
  4194. ===========                    _________
  4195. Inside console (regulated) :  < 1 2 3 4 |
  4196.                                ---------
  4197. #  Volts
  4198. --------
  4199. 1   -5
  4200. 2   +12
  4201. 3   GND
  4202. 4   +5
  4203.  
  4204. The pinouts for the external plug look like this:
  4205.      >___   ___>  >--1 (red)
  4206.          )!(
  4207.     2    )!(
  4208.     2    )!(
  4209.     0    )!(--->  >--2 (white)
  4210.     V    )!(
  4211.     ~    )!(
  4212.      >___)!(___>  >--4 (black)
  4213.  
  4214.      transformer  >--3 (nc)
  4215.  
  4216. NB: for US users replace 220V with 110V
  4217.     The AC values on pins 1, 2 and 4 appear to vary according to the
  4218.     model of transformer. Thus I did not idicate them here.
  4219.  
  4220. Monitor port:  3  U  1  (This is a round plug, with a notch U at top)
  4221. =============   5   4
  4222. #  Use            2
  4223. ------
  4224. 1  12V vid
  4225. 2  R-Y (color burst clock)
  4226. 3  Sound output
  4227. 4  Y
  4228. 5  B-Y (external video input?)
  4229. U  GND
  4230.  
  4231. Cartridge port:
  4232. ===============
  4233.  ______________________________________________________________
  4234. |                                       2                  36  |
  4235. |                                      [====================]  |
  4236. |_______________________________________1__________________35__|
  4237. |___|___|___|___|___|___|___|___|___|_|                        |
  4238. |_____|___|___|___|___|___|___|___|___|                        |
  4239. |___|___|___|___|___|___|___|___|_____|                        |
  4240. |_____|___|___|___|___|___|___|___|___|                        |
  4241. |___|___|__________________|___|______|________________________|
  4242.  
  4243. #   Name    I/O  Use
  4244. -   ----    ---  -----------
  4245. 1   RESET   <    Resets the system (active high)
  4246. 2   GND          Signal groud
  4247. 3   D7      <>   Data bus, bit 7 (least significant)
  4248. 4   CRUCLK* >    Inversion of TMS9900 CRUCLOCK pin
  4249. 5   D6      <>
  4250. 6   CRUIN   <    CRU input to TMS9900
  4251. 7   D5      <>
  4252. 8   A15     >    Address bus, bit 15 / also CRU output bit
  4253. 9   D4      <>
  4254. 10  A13     >
  4255. 11  D3      <>
  4256. 12  A12     >
  4257. 13  D2      <>
  4258. 14  A11     >
  4259. 15  D1      <>
  4260. 16  A10     >
  4261. 17  D0      <>   Data bus, bit 0 (most significant)
  4262. 18  A9      >
  4263. 19  VCC          +5 Volts power supply
  4264. 20  A8      >
  4265. 21  GS*     >    Grom select. Active low is addr in >9800-9FFF
  4266. 22  A7      >
  4267. 23  A14     >    Address bus, bit 14. Select mode: low=data / high=addr
  4268. 24  A3      >
  4269. 25  DBIN    >    Active high = read memory
  4270. 26  A6      >
  4271. 27  GRC     >    GROM clock: color burst of VDP 9918A
  4272. 28  A5      >
  4273. 29  VDD          -5 Volts power supply
  4274. 30  A4      >
  4275. 31  GR      <    Active high = GROM ready
  4276. 32  WE*     >    Active low = write enable (derived from TMS9900 WE*)
  4277. 33  VSS
  4278. 34  ROMG*   >    Active low if addr in >6000-7FFF
  4279. 35  GND
  4280. 36  GND
  4281.  
  4282. Side port: (peripheral connector)
  4283. ==========
  4284.                                  __________________________
  4285.                                 /                          |
  4286.                                /                           |
  4287.   ____________________________/      2              44     |
  4288.  /                                  [================]     |
  4289. /                                    1              43     |
  4290. |__________________________________________________________|
  4291.  
  4292. #   Name    I/O  Use
  4293. -   ----    ---  -----------
  4294. 1   VCC          +5 Volts power supply
  4295. 2   SBE     >    Low if addr in >9000-94xx (sound port)
  4296. 3   RESET*  >    System reset (active low)
  4297. 4   EXTINT* <    External interrupt (active low)
  4298. 5   A5      >    Address bus, bit 5
  4299. 6   A10     >
  4300. 7   A4      >
  4301. 8   A11     >
  4302. 9   DBIN    >    Active high = read memory
  4303. 10  A3      >
  4304. 11  A12     >
  4305. 12  READY   <    Active high = memory is ready
  4306. 13  LOAD*   <    Unmaskable interrupt (=> BLWP @>FFFC)
  4307. 14  A8      >
  4308. 15  A13     >
  4309. 16  A14     >
  4310. 17  A7      >
  4311. 18  A9      >
  4312. 19  A15     >    Address bus, lsb. Also CRU output bit.
  4313. 20  A2      >
  4314. 21  GND
  4315. 22  CRUCLK* >    Inversion of TMS9900 CRUCLOCK pin
  4316. 23  GND
  4317. 24  PHI3*   >    Inversion of phase 3 clock
  4318. 25  GND
  4319. 26  WE*     >    Write Enable (derived from TMS9900 WE* pin)
  4320. 27  GND
  4321. 28  MBE*    >    Active low if addr in >4000-5FFF (card ROMs)
  4322. 29  A6      >
  4323. 30  A1      >
  4324. 31  A0      >    Address bus, bit 0 (most significant)
  4325. 32  MEMEN*  >    Memory access enable (active low)
  4326. 33  CRUIN   <    CRU input bit to TMS9900
  4327. 34  D7      <>   Data bus, bit 7 (least significant)
  4328. 35  D4      <>
  4329. 36  D6      <>
  4330. 37  D0      <>   Data bus, bit 0 (most significant)
  4331. 38  D5      <>
  4332. 39  D2      <>
  4333. 40  D1      <>
  4334. 41  IAQ     >    Interrupt acknowledged by TMS9900
  4335. 42  D3      <>
  4336. 43  VDD          -5 Volts power supply
  4337. 44  AUDIOIN <    To sound generator AUDIO IN pin
  4338.  
  4339. Keyboard connector: (inside the console) Red wire is #15
  4340. ===================
  4341. pin|    12    13    14    15    9    8    6
  4342. ---+-------------------------------------------------------------
  4343. 5  |    =    .    ,    M    N    /
  4344. 4  |  space    L    K    J    H    ;
  4345. 1  |  enter    O    I    U    Y    P
  4346. 2  |        9    8    7    6    0
  4347. 7  |  fctn    2    3    4    5    1    lock
  4348. 3  |  shift    S    D    F    G    A
  4349. 10 |  ctrl    W    E    R    T    Q
  4350. 11 |        X    C    V    B    Z
  4351.  
  4352. Note: pressing a key closes the contact between corresponding row + column.
  4353.  
  4354. Since there are no diodes to prevent current going backwards, pressing 3
  4355. keys at a time often results in appearance of a "phantom" key at the 4th
  4356. corner of the square formed by these keys (e.g 8+7+3=phantom 4: current
  4357. goes pin15-7-8-3-pin7 as if 4 were pressed)
  4358.  
  4359. Card slots: (inside the PE box)
  4360. ===========
  4361.                            59      Left         1
  4362.                     Front   =====================   Rear
  4363.                            60      Right        2
  4364.  
  4365. #   Name    I/O  Use
  4366. -   ----    ---  -----------
  4367. 1                +5V 3-T regulator voltage supply (about +8V)
  4368. 2                Dito
  4369. 3   GND
  4370. 4   READYA       System ready (10K pull-up to +5V)
  4371. 5   GND
  4372. 6   RESET*  >    System reset (active low)
  4373. 7   GND
  4374. 8   SCLK    nc   System clock (not connected)
  4375. 9   LCP*    nc   CPU indicator 1=TI99 0=2nd generation (not connected)
  4376. 10  AUDIO   <    Input audio (=AUDIOIN)
  4377. 11  RDBENA* <    Active low: enable flex cable data bus drivers (1K pull-up)
  4378. 12  PCBEN   H    PCB enable for burn-in (always High)
  4379. 13  HOLD*   H    Active low CPU hold request (always High)
  4380. 14  IAQHA   nc   IAQ [or] HOLDA  (logical or)
  4381. 15  SENILA* H    Interrupt level A sense enable (always High)
  4382. 16  SENILB* H    Interrupt level B sense enable (always High)
  4383. 17  INTA*   <    Active low interrupt level A (=EXTINT*)
  4384. 18  LOAD*   nc   Unmaskable interrupt (not connected)
  4385. 19  D7      <>   Data bus, bit 7 (least significant)
  4386. 20  GND
  4387. 21  D5      <>
  4388. 22  D6      <>
  4389. 23  D3      <>
  4390. 24  D4      <>
  4391. 25  D1      <>
  4392. 26  D2      <>
  4393. 27  GND
  4394. 28  D0      <>   Data bus, bit 0 (most significant)
  4395. 29  A14     >
  4396. 30  A15     >    Address bus, lsb. Also CRU output bit.
  4397. 31  A12     >
  4398. 32  A13     >
  4399. 33  A10     >
  4400. 34  A11     >
  4401. 35  A8      >
  4402. 36  A9      >
  4403. 37  A6      >
  4404. 38  A7      >
  4405. 39  A4      >
  4406. 40  A5      >
  4407. 41  A2      >
  4408. 42  A3      >
  4409. 43  A0      >   Address but, bit 0 (most significant)
  4410. 44  A1      >
  4411. 45  AMB     H   Extra address bit. Always High.
  4412. 46  AMA     H   Extra address bit. Always High.
  4413. 47  GND
  4414. 48  AMC     H   Extra address bit. Always High.
  4415. 49  GND
  4416. 50  CLKOUT* >   Inversion of phase 3 clock (=PHI3*)
  4417. 51  CRUCLK* >   Inversion of TMS9900 CRUCLOCK pin
  4418. 52  DBIN    >   Active high = read memory
  4419. 53  GND
  4420. 54  WE*     >   Write Enable (derived from TMS9900 WE* pin)
  4421. 55  CRUIN   <   CRU input bit to TMS9900
  4422. 56  MEMEN*  >   Memory access enable (active low)
  4423. 57              -12 Volts 3-T regulator supply voltage (about -16V)
  4424. 58              Dito
  4425. 59              +12 Volts 3-T regulator supply voltage (about +16V)
  4426. 60              Dito
  4427.  
  4428. Notes:
  4429. o Signals buffered by 74LS244 in connection card: A0-A15, DBIN, MEMEN*, WE*,
  4430.   CLRCLK*, RESET*, CLKOUT.
  4431. o Unbuffered signals: CRUIN, INTA*, AUDIOIN, READY
  4432. o Data bus is buffered by two 74LS245 (one at each end of the cable),
  4433.   driven by RDBENA (direction set by DBIN).
  4434. o All signals must be re-buffered on each card.
  4435. o Always High lines (AMA, AMB, AMC, SENILA*, SENILB*, PCBEN, HOLD*) are pulled
  4436.   up to +5 Volts by 47 Ohms resistors.
  4437. o Connection card light is turned on by DBIN (High = on).
  4438.  
  4439. Thierry Nouspikel, MD, PhD        | "Un technocrate c'est un mec,
  4440. Department of Biological Sciences    |  tu lui poses une question,
  4441. Stanford University            |  quand il a fini de repondre
  4442. Phone: 1 415 723 2425                    |  tu comprends plus ta question".
  4443. Fax: 1 415 725 1848                    | Michel Colucci, dit "Coluche"
  4444. Email: thierry.nouspikel@stanford.edu    |
  4445.  
  4446. ============================================================================
  4447. DTIHM036
  4448.  
  4449. How to adapt Atari joystick to work on the TI.
  4450. Author Unknown
  4451.  
  4452.  
  4453. TI Joystick pins    Atari Joystick Pins
  4454. -- -------- ----    ----- -------- ----
  4455. 1) N.C.         ------------1) Up        S
  4456. 2) Stick B--|   | ----------2) Down      t
  4457.    Ground   |   | | --------3) Left      i
  4458. 3) Up-----------+ | |     --4) Right     c
  4459. 4) Fire---------|-|-|-|   | 5) N.C.      k
  4460.    Button   |   | | | +-----6) Fire btn
  4461. 5) Left---------|-|-+ |   | 7) N.C.      B
  4462. 6) N.C.     |---|-|-|-|---|-8) Ground
  4463. 7) Stick A--------------- | 9) N.C.
  4464.    Ground       | | | | | |
  4465. 8) Down-------- --|-|-|-|-|-1) Up        S
  4466. More?
  4467. 9) Right---|  |---+-|-|-|-|-2) Down      t
  4468.            ---------+-------3) Left      i
  4469. [Female]              | | --4) Right     c
  4470.                       | |   5) N.C.      k
  4471.                       --|---6) Fire btn
  4472.                         |   7) N.C.      A
  4473.                         ----8) Ground
  4474.                             9) N.C.
  4475.  
  4476. ============================================================================
  4477. DTIHM037
  4478.  
  4479.                                  GRAND RAM
  4480.                             Technical Specifications
  4481.                            Last Update: August 14, 1987
  4482.   
  4483. GRAND RAM TECHNICAL DATA                                       INTRODUCTION
  4484.                                    SECTION 1
  4485.   
  4486.  The GRAND RAM card is designed to provide as many features as possible, while
  4487.  still keeping the cost reasonable.  GRAND RAM provides the following features:
  4488.   
  4489.    1. 512K bytes of battery-backed CMOS memory for RAM Disk, print spooling,
  4490.       text editing.  The memory is expandable in increments of 32K bytes, using
  4491.       256K bit static RAM chips (32K X 8 ).  All memories are socketed, so no
  4492.       soldering is required for the full 512K capability.
  4493.   
  4494.    2. Optional real-time clock allows time-stamping of files, clock access from
  4495.       BASIC, X-BASIC, assembly.
  4496.   
  4497.    3. Two expansion ports, each with different capabilities:
  4498.       a. The Cartridge Emulator Port (CEP) provides all the signals required
  4499.          to support an add-on board which will emulate 99% of the cartridges in
  4500.          existence.  The add-on board plugs into the 46 pin, dual-row, .025"
  4501.          square post header mounted on the GRAND RAM card.
  4502.   
  4503.       b. The Device Expansion Port (DEP) provides all the signals required to
  4504.          implement a variety of novel peripherals for the 99/4A, including:
  4505.          multiple channel music boards, A/D  D/A capability with digital echo
  4506.          and reverberation, temperature logging, home control, etc.  The device
  4507.          port add-on boards will plug into a 38 pin, dual-row, .025" square
  4508.          post header on the GRAND RAM card.
  4509.   
  4510.   
  4511.    4. The technical specifications for these expansion ports are provided.
  4512.       GRAND RAM provides a great opportunity for hobbyists to do their own
  4513.       hardware projects.  Most of the bus interface and decode circuitry is
  4514.       already provided by GRAND RAM, which makes device interfacing very
  4515.       simple.
  4516.   
  4517.    5. A Programmable Interrupt Timer, which provides the capability for print
  4518.       spooling, hot keys (with the proper software), as well as providing
  4519.       programmable timing pulses to the Device Expansion Port.
  4520.   
  4521.    6. Hardware Write Protect feature reduces the chances of a runaway program
  4522.       trashing the DSR.
  4523.   
  4524.  Designed by Sofmachine Inc.         1-1            Copyright 1987 DataBioTics
  4525.     
  4526.  
  4527.  
  4528.   
  4529. GRAND RAM TECHNICAL DATA                               GRAND RAM Architecture
  4530.                                    SECTION 2
  4531.   
  4532.  All memories and devices are accessed through the DSR address space of the
  4533.  99/4A, which is the 8K block from >4000 to >5FFF, and the CRU space.  The CRU
  4534.  base address is dependent upon some DIP switch settings.  Some of the CRU bits
  4535.  are used to control access to the memory and memory-mapped I/O devices.  The
  4536.  512K RAM memory is accessed in 2K pages.
  4537.   
  4538.   
  4539.    1. CRU Base Address for GRAND RAM - Setting the DIP Switches Switches 1, 2,
  4540.       and 3 of the 4-section DIP switch are used to determine the CRU address
  4541.       at which GRAND RAM responds.  Any one of seven CRU addresses may be
  4542.       selected.
  4543.  
  4544.       Since the disk controller card uses the CRU slot at >1100 and the RS232
  4545.       card uses the slot at >1300, these addresses are not available for GRAND
  4546.       RAM.  The following table details the CRU addresses for all switch
  4547.       settings.
  4548.   
  4549.   
  4550.                           DIP Switch/CRU Address Chart
  4551.                  ---------------------------------------------
  4552.                  | SW1   SW2   SW3   |     CRU Address       |
  4553.                  ---------------------------------------------
  4554.                  |  ON    ON    ON   |       >1000           |
  4555.                  |  ON    ON   OFF   |       >1200           |
  4556.                  |  ON   OFF    ON   |       >1400           |
  4557.                  |  ON   OFF   OFF   |       >1500           |
  4558.                  | OFF    ON    ON   |       >1600           |
  4559.                  | OFF    ON   OFF   |       >1700           |
  4560.                  | OFF   OFF    ON   |       >1800           |
  4561.                  | OFF   OFF   OFF   |   GRAND RAM DISABLED  |
  4562.                  ---------------------------------------------
  4563.   
  4564.    2. CRU Bits for Memory Control
  4565.       In order to access the DSR memory address space, the first CRU bit
  4566.       (CRUBIT0) in the GRAND RAM's CRU space must be set to a 1.  The second
  4567.       CRU bit (CRUBIT1) is the Write Protect bit (1=Write Protected), which
  4568.       dissallows all writes to the memory space of GRAND RAM.  The memory-
  4569.       mapped I/O devices are accessed at locations >4F00 - >4FFF.  In order
  4570.       to access these mem-mapped I/O devices, the third CRU bit (CRUBIT2)
  4571.       must set to zero.  If CRUBIT2 = 1, then memory is present at >4F00 -
  4572.       >4FFF.
  4573.   
  4574.  Designed by Sofmachine Inc.         2-1          Copyright 1987 DataBioTics
  4575.     
  4576.  
  4577.  
  4578.   GRAND RAM TECHNICAL DATA                               GRAND RAM Architecture
  4579.   
  4580.    3. RAM Memory Access  Mapping
  4581.       The first two 2K blocks of GRAND RAM memory (4K total) are permanently
  4582.       mapped into the first 4K bytes of the DSR space (>4000 - >4FFF).
  4583.       However, the 256-byte RAM block from >4F00 to >4FFF and the I/O devices
  4584.       are swapped in and out using CRUBIT2 as described above.  The second 4K
  4585.       bytes of DSR memory space (>5000 - >5FFF) are used to access selected
  4586.       blocks of GRAND RAM memory.  This second 4K space is split in half: the
  4587.       first memory space starts at >5000 and the second at >5800.  The
  4588.       specific blocks of GRAND RAM memory which are mapped into these two 
  4589.       address spaces are defined by two 8-bit, write-only, page registers.
  4590.       This "dual-window" architecture allows two different blocks of GRAND
  4591.       RAM memory to be accessed without banking.
  4592.   
  4593.    4. Onboard I/O Device Mapping
  4594.       There are only four active I/O device locations on the GRAND RAM board.
  4595.       Two are the write-only memory page registers (discussed above) and the
  4596.       remaining two are the read and write locations for the real-time clock.
  4597.       The address and function of each device location is described below, as
  4598.       well as the required value of CRUBIT0 thru CRUBIT2 when accessing these
  4599.       devices.
  4600.   
  4601.   
  4602.                                   CRU I/O Map
  4603.   
  4604.       Address   CRUBIT0  CRUBIT1  CRUBIT2            Function
  4605.       -----------------------------------------------------------------------
  4606.        >4FE0       1        0        0        Selects which 2K page of GRAND
  4607.                                               RAM memory is mapped into the
  4608.                                               address space from >5000 to
  4609.                                               >57FF.
  4610.        >4FE2       1        0        0        Selects which 2K page of GRAND
  4611.                                               RAM memory is mapped into the
  4612.                                               address space from >5800 to
  4613.                                                >5fFF.
  4614.        >4FE4       1        0        0        Write to the Real-time Clock
  4615.        >4FE6       1        0        X        Read from the Real-time Clock
  4616.   
  4617.    5. TMS9901 Interval Timer  I/O Peripheral
  4618.       The TMS9901 is a peripheral designed specifically for the 9900 family of
  4619.       microprocessors, and contains: 16 general-purpose I/O lines, 6 interrupt
  4620.       lines (also usable simply as input lines), a timer with 21.3 uS
  4621.       resolution and interrupt capability.  The 9901 occupies 32 bits of CRU
  4622.       space, starting at the CRU base selected by the GRAND RAM DIP switches.
  4623.       IMPORTANT NOTE TO ALL PROGRAMMERS AND DEVELOPERS: the CRU bit addresses
  4624.       have been modified slightly such that the top and bottom halves of the
  4625.       9901 CRU bit mappings have been swapped.  This means that the I/O bits
  4626.       start at CRU bit 0 and the clock/interrupt bits start at CRU bit 16.
  4627.       This was done so that the first I/O bit could be used to enable/disable
  4628.       GRAND RAM and still be compatible with the 99/4A DSR lookup protocol, 
  4629.       which uses CRU bit 0 to enable or disable a given DSR memory space.
  4630.       Due to the sophisticated nature of the 9901, a full discussion of it's
  4631.       capabilities is beyond the scope of this document.  The reader desiring
  4632.       this information should refer to the TMS9901 Programmable Systems
  4633.       Interface booklet, or the 9900 Family Systems Design handbook, both
  4634.       published by Texas Instruments.
  4635.   
  4636.  Designed by Sofmachine Inc.         2-2            Copyright 1987 DataBioTics
  4637.   
  4638.    
  4639.  
  4640. GRAND RAM TECHNICAL DATA                               GRAND RAM Architecture
  4641.   
  4642.    6. Real-time Clock Access
  4643.       The clock chip which is compatible with GRAND RAM is the Dallas
  4644.       Semiconductor DS1215.  Access to the chip is through the clock read and
  4645.       write addresses, specified above.  The clock is accessed through a 1-bit
  4646.       interface which is connected to the most significant bit, DB7, of the
  4647.       buffered P-box data bus.  Timekeeping features include: time resolution
  4648.       of timekeeping.  For complete programming information, consult the DS1215
  4649.       data sheet.
  4650.   
  4651.    7. Interrupts
  4652.       GRAND RAM provides full interrupt capability, controlled by the TMS9901.
  4653.       There are two possible sources of interrupts:
  4654.       a. The 9901 Interval Timer can be programmed to interrupt on level 3.  If
  4655.          the interval Timer interrupt is enabled, the INT3 line is disabled.
  4656.       b. The six external interrupt pins which are connected to the Device
  4657.          Expansion Port may cause an interrupt if the proper option board is
  4658.          attached.  The interrupt 1 input (-INT1) has an onboard pullup
  4659.          resistor.  All interrupt control is as described in the TMS9901
  4660.          manual, with the exception of one extra level of hardware masking.  No
  4661.          interrupts will occur on the 99/4A PEB bus unless CRUBIT3 is set to a
  4662.          zero.  This allows the interval timer to be used as a precisely
  4663.          controlled hardware strobe for option boards connected to the Device
  4664.          Expansion Port, without actually generating an interrupt to the CPU.
  4665.          After power-up CRUBIT3 is set high, thus disabling 9901 interrupts to
  4666.          the CPU until explicitly enabled by the software.
  4667.   
  4668.  Designed by Sofmachine Inc.         2-3          Copyright 1987 DataBioTics
  4669.     
  4670.  
  4671.  
  4672. GRAND RAM TECHNICAL DATA                                   Hardware Design
  4673.                                    SECTION 3
  4674.   
  4675.  The hardware to implement GRAND RAM is very modular.  All IC's perform one or
  4676.  memory, multiplexer, register, miscellaneous logic.
  4677.   
  4678.    1. Buffering
  4679.       Initially, the address, control, and data lines from the peripheral bus
  4680.       are buffered by 74LS244 (Address  Control) and 74LS245 (Data) bus driver
  4681.       chips.
  4682.    2. Miscellaneous Logic
  4683.       To ensure that addresses are stable when MEMEN is asserted, the leading
  4684.       edge of MEMEN is synchronously delayed for approximately 135 nS.  This is
  4685.       accopmplished with an inverter (74LS05), and a D flip-flop (74LS74) which
  4686.       is clocked by the phase 3- bus clock.
  4687.    3. Decoding/PALs
  4688.       A delayed version of MEMEN (described earlier) and the buffered control
  4689.       and address lines are the inputs to the two PALS.  These PALs provide the
  4690.       signals required for controlling GRAND RAM.  The following signals and
  4691.       functions are provided by the PALs:
  4692.        a. Clock strobes for the two 8-bit memory page registers.
  4693.        b. Output enable strobes for the two 8-bit memory page registers.
  4694.        c. Enable strobe for the two 74LS138 memory chip select decoders.
  4695.        d. Chip select for RAM chip #0.
  4696.        e. Chip select for the Real-time clock chip.
  4697.        f. Chip select for the TMS9901 peripheral chip.
  4698.        g. Multiplex control for >4000 - >4FFF RAM access.
  4699.        h. Protected Write Enable for RAMs.
  4700.        i. Local data bus enable control.
  4701.        j. Buffered tri-state remote data bus enable.
  4702.        k. Pre-decoded GRAM signal for future cartridge emulation.
  4703.        l. Pre-decoded Expansion I/O strobe (-EXPIO).
  4704.    4. Page Registers
  4705.       The two page registers are implemented with octal, edge-clocked latches
  4706.       with tri-state outputs (74LS374).  The register output enable controls
  4707.       are used to select which page register is addressing the GRAND RAM 
  4708.       memory, thus providing a zero-chip multiplexing function.
  4709.    5. Special Functions
  4710.       The TMS9901 peripheral interface is straitforward, except for the
  4711.       transposed top and bottom internal mapping.  This is implemented by
  4712.       inverting the most significant address line (BA10) to the 9901.  The
  4713.       real-time clock chip is mapped so that no unprogrammed accesses can
  4714.       occur, which is a hazard due to the 9900 read-before-write bus timing.
  4715.     
  4716.  Designed by Sofmachine Inc.         3-1          Copyright 1987 DataBioTics
  4717.     
  4718.  
  4719.  
  4720. GRAND RAM TECHNICAL DATA                                   Hardware Design
  4721.    6. Memory
  4722.       The memory chips are 32K X 8 SRAMs, and are connected to a fully buffered
  4723.       bus.  Also, the chip select and write enable lines are pulled up during
  4724.       power down to minimize standby power consumption.  Chip select decoding 
  4725.       is provided by two 74LS138 decoders.  During any accesses to GRAND RAM at
  4726.       addresses >4000->4FFF, the first 4K of RAM chip #0 will always be
  4727.       selected.  Half of a 74LS244 buffer is used to force the address to the
  4728.       first 4K of a memory chip, and the PAL always selects RAM chip #0 during
  4729.       accesses to >4000->4FFFF.  During accesses to >5000-57FF, page register
  4730.       #0 addresses both the RAMs and chip select decoders, causing the
  4731.       appropriate 2K page to be selected.  Accesses to >5800->5FFF cause page
  4732.       register #1 to select a 2K page, in the same manner as page register #0.
  4733.    7. Power Supply
  4734.       Grand Ram contains two seperate power busses.  The first, the logic power
  4735.       bus, supplies power to all the TTL and PAL chips.  The RAMs and clock
  4736.       chip recieve power from the memory power bus.  The memory power bus must
  4737.       supply power when the P-box is turned off.  Diode D3 disconnects the
  4738.       memory power bus from the rest of the system during power-down, assuring
  4739.       minimal current drain from the battery.  When the P-box is powered up,
  4740.       D3 and R4 provide a trickle charging network for the battery.  The three
  4741.       regulator shunt resistors, R5-R7, supply some of the regulated 5 volt 
  4742.       logic current, thereby reducing the power (heat) dissipated in the 
  4743.       regulator.  A voltage divider, composed of R2, R3, and C2, supplies the
  4744.       appropriate backup voltage to the clock chip.
  4745.    8. Cartridge Emulator Port
  4746.       The design goal for the Cartridge Emulator Port (CEP) is to provide all
  4747.       the signals required to operate a cartridge.  The Cartridge Emulator, an
  4748.       optional daughterboard which plugs into the CEP, will function as a
  4749.       loadable cartridge port.  With the proper software installed in GRAND
  4750.       RAM, cartridges could be loaded from RAMdisk or floppy disk into the
  4751.       Cartridge Emulator and executed, without ever having a cartridge plugged
  4752.       into the console! A menu of the user's favorite cartridges could be
  4753.       displayed automatically after the TI99/4A is turned on.  This would
  4754.       allow the user to select a particular cartridge with a single keypress.
  4755.       The Cartridge Emulator Port provides the following support:
  4756.        a. Four 8K-blocks of memory, which are banked into the cartridge CPU
  4757.           address space from >6000->7fff.  Some of the TMS9901 I/O lines are
  4758.           used for controlling the which 8K block is selected.  The banking
  4759.           architecture supports ame 99% of the existing cartridges.
  4760.        b. 64K of GRAM, partitioned at the console/cartridge address boundary.
  4761.           This allows for independent control of both console and cartridge
  4762.           grom emulation.
  4763.     
  4764.  Designed by Sofmachine Inc.         3-2          Copyright 1987 DataBioTics
  4765.     
  4766.  
  4767.  
  4768.  GRAND RAM TECHNICAL DATA                                   Hardware Design
  4769.   
  4770.            Cartridge Emulator Port (CEP ) Connector Definition
  4771.   
  4772.     Pin #     Name     Type     Function/Definition
  4773.     ---------------------------------------------------------------
  4774.      1,2      +U8V      PWR  Unregulated 8 volt power input
  4775.      3-10     BD7-BD0   I/O  Buffered Data bus.  DB7 is Least sig bit
  4776.      11-26    BA15-BA0  Out  Buffered Address Bus.  BA15 is least sig bit
  4777.      27       -BMEMEN   Out  Buffered and reclocked P-box -MEMEN (active low)
  4778.      28       -BWE      Out  Buffered P-box -WE (active low write enable)
  4779.      29       -LCLDBEN  In   LoCaL Data Bus ENable (active low).  When active,
  4780.                              this causes the data bus drivers to be turned on.
  4781.                              Drive this line with an open-collecter source.
  4782.      30       -BDBIN    Out  Buffered, active low, version of P-box DBIN
  4783.      31       -ABC      Out  Active (low) when P-box extended memory bits
  4784.                              A, B, and C are all equal to 1.
  4785.      32       -GRAMSEL  Out  Active (low) whenever an access occurs in
  4786.                              the grom space (>9800->9FFF).
  4787.      34       CRUBIT4   Out  =0 enable gram emulation for console
  4788.                                 groms (>0000->5FFF)
  4789.                              =1 disable emulation for console groms
  4790.      33       CRUBIT5   Out  =0 enable gram emulation for cartridge
  4791.                                 groms (>6000->FFFF)
  4792.                              =1 disable emulation for cartridge groms
  4793.      36       CRUBIT6   Out  =0 enable writes to emulation gram
  4794.                              =1 disable writes to emulation gram
  4795.      35       CRUBIT7   Out  =0 enable emulation of cartidge rom/ram
  4796.                                 memory from >6000->7FFF.
  4797.                              =1 disable emulation of cartridge rom/ram memory
  4798.      38       CRUBIT8   Out  =0 CRUBIT9 pages in the upper or lower
  4799.                                 8K block for emulation of cartridge rom/ram.
  4800.                                 Used when loading up a cartridge, or
  4801.                                 developing new applications.
  4802.                              =1 the value of Address bit 14 during
  4803.                                 the last write to cartridge ram/rom selects
  4804.                                 the upper or lower 8K block of emulation
  4805.                                 rom/ram.  This maintains compatibility with
  4806.                                 existing cartridges.
  4807.      37       CRUBIT9   Out  =0 selects the lower 8K block (out of 16K)
  4808.                              =1 selects the upper 8K block (out of 16K)
  4809.      40       CRUBIT10  Out  =0 selects the lower 16K block (out of 32K)
  4810.                              =1 selects the upper 16K block (out of 32K)
  4811.                              This bit, along with either CRUBIT9 or the latched
  4812.                              value of BA14, form a page address, which selects
  4813.                              of the four 8K blocks from the available 32K
  4814.                              of emulation ram.
  4815.      39       CRUBIT11  Out  =0 enable writes to cartridge emulation ram/rom
  4816.                                 at addresses >6000 - >6FFF. (for ram emulation)
  4817.                              =1 disable writes to cartridge emulation ram/rom
  4818.                                 at addresses >6000 - >6FFF. (for rom emulation)
  4819.      42       CRUBIT12  Out  =0 enable writes to cartridge emulation ram/rom
  4820.   
  4821.      Sofmachine, Inc.                  3-4
  4822.     
  4823.      GRAND RAM TECHNICAL DATA                                Hardware Design
  4824.   
  4825.                                 at addresses >7000 - >7FFF. (for ram emulation)
  4826.                              =1 disable writes to cartridge emulation ram/rom
  4827.                                 at addresses >7000 - >7FFF. (for rom emulation)
  4828.      41       N/C            No connection
  4829.      43,44    GROUND    PWR  Ground for power and signals
  4830.      45,45    N/C            No connection
  4831.   
  4832.         9. Device Expansion Port
  4833.                 The  design goal for the Device Expansion Port (DEP) is
  4834.            to provide all the signals required for  a  general  purpose
  4835.            I/O  expansion  capability.   The DEP provides the following
  4836.            features:
  4837.            a. 224 bytes of predecoded memory-mapped I/O  space  with
  4838.               an active low polarity.
  4839.            b. Three CRU single bit I/O ports.
  4840.            c. Five interrupt inputs, which are also usable as single
  4841.               CRU inputs bits/
  4842.            d. Access  to  the  audio  input of the 99/4A sound chip.
  4843.               This  allows  add-on  boards  to  output  their  sound
  4844.               through  the  normal  99/4A audio channel, in the same
  4845.               fashion as the speech peripheral.
  4846.   
  4847.      Sofmachine, Inc.                  3-5
  4848.   
  4849.    
  4850.  
  4851.     
  4852.      GRAND RAM TECHNICAL DATA                                Hardware Design
  4853.   
  4854.   
  4855.            Device Expansion Port (DEP ) Connector Definition
  4856.   
  4857.     Pin #     Name     Type     Function/Definition
  4858.     ---------------------------------------------------------------
  4859.      1,2      +U8V      PWR  Unregulated 8 volt power input
  4860.      3-10     BD7-BD0   I/O  Buffered Data bus.  DB7 is Least sig bit
  4861.      11-18    BA15-BA8  Out  Partial Buffered Address Bus.  BA15 is least sig bit
  4862.      19       -EXPIO    Out  Active (low) when an address access in the
  4863.                              range of >4F00 - >4FDF, and the proper CRU bits
  4864.                              are set up.  See the memory map for required
  4865.                              CRU values to activate this signal.
  4866.      20       -BWE      Out  Buffered P-box -WE (active low write enable)
  4867.      21       -PH3      Out  Buffered 3 MHz negaged phase 3 P-box signal
  4868.      22       -BDBIN    Out  Buffered, active low, version of P-box DBIN
  4869.      23       READY     In   Ready to the 99/4A processor.  To extend a memory
  4870.                              cycle, drive this line low with an open-collector
  4871.                              output.
  4872.      24       -INT1     In   Active low interrupt input to the TMS9901
  4873.                              INT1 input.  This line is pulled up to +5V
  4874.                              with a resistor on the GRAND RAM board.
  4875.      26       -INT9901  Out  Active low interrupt output from the TMS9901
  4876.                              With proper software, this output can be programmed
  4877.                              to supply a pulse at a rate determined by the
  4878.                              9901 interval timer.  This would be useful
  4879.                              as a very stable and controllable sample
  4880.                              pulse for A/D and D/A converters, etc.
  4881.      25       CRUBIT13  I/O  General-purpose CRU I/O bit
  4882.      28       CRUBIT14  I/O  General-purpose CRU I/O bit
  4883.      27       CRUBIT15  I/O  General-purpose CRU I/O bit
  4884.      29       AUDIO     In   External audio input to console sound chip
  4885.      30       -INT2     In   Interrupt or general purpose input
  4886.      32       -INT4     In   Interrupt or general purpose input
  4887.      31       -INT5     In   Interrupt or general purpose input
  4888.      34       -INT6     In   Interrupt or general purpose input
  4889.      33       N/C            No Connection
  4890.      35,36    GND       PWR  Ground for power and signals
  4891.      37,38    N/C            No connection
  4892.   
  4893.      Sofmachine, Inc.                  3-6
  4894.   
  4895.  
  4896.  
  4897.   
  4898.      GRAND RAM TECHNICAL DATA                                Hardware Design
  4899.   
  4900.                                    MEMORY MAP
  4901.   
  4902.            +--------------------+--------------------+
  4903.            |     CRUBIT0 = 1    |      CRUBIT0 = 1   |
  4904.            |     CRUBIT2 = 0    |      CRUBIT2 = 1   |
  4905.            |--------------------+--------------------|
  4906.       >4000|                                         |
  4907.            |              RAM  PAGE  0               |
  4908.       >47FF|                                         |
  4909.            |--------------------|--------------------|
  4910.       >4800|                                         |
  4911.            |              RAM  PAGE  1               |
  4912.       >4EFF|                                         |
  4913.            |--------------------|--------------------|
  4914.       >4F00|                    |                    |
  4915.            |   EXPANSION        |                    |
  4916.            |   PORT I/O         |                    |
  4917.       >4FDF|                    |                    |
  4918.            |--------------------|                    |
  4919.       >4FEO|  PAGE REGISTER #0  |                    |
  4920.            |--------------------|                    |
  4921.       >4FE1|     UNUSED         |                    |
  4922.            |--------------------|                    |
  4923.       >4FE2|  PAGE REGISTER #1  |                    |
  4924.            |--------------------|                    |
  4925.       >4FE3|     UNUSED         |                    |
  4926.            |--------------------|                    |
  4927.       >4FE4|  CLOCK WRITE       |    RAM PAGE 1      |
  4928.            |--------------------|                    |
  4929.       >4FE5|     UNUSED         |                    |
  4930.            |--------------------|                    |
  4931.       >4FE6|  CLOCK READ        |                    |
  4932.            |--------------------|                    |
  4933.       >4FE7|     UNUSED         |                    |
  4934.            |--------------------|                    |
  4935.       >4FE8|  >4FE0 - >4FE7     |                    |
  4936.            |  is mirrored in    |                    |
  4937.            |  in this space     |                    |
  4938.       >4FFF|                    |                    |
  4939.            |--------------------|--------------------|
  4940.       >5000|                                         |
  4941.            |        RAM PAGE SELECTED BY             |
  4942.            |        PAGE REGISTER #0                 |
  4943.       >57FF|                                         |
  4944.            |-----------------------------------------|
  4945.       >5800|                                         |
  4946.            |        RAM PAGE SELECTED BY             |
  4947.            |        PAGE REGISTER #1                 |
  4948.       >5FFF|                                         |
  4949.            |-----------------------------------------|
  4950.   
  4951.      Sofmachine, Inc.                  3-7
  4952.    
  4953. ============================================================================
  4954. DTIHM038
  4955.  
  4956.           THE PAL12L6 OF THE MYARC FLOPPY DISK CONTROLLER
  4957.                 @Paolo Bagnaresi, February 1990   - % -
  4958.           THE PAL12L6 OF THE MYARC FLOPPY DISK CONTROLLER
  4959.           ===============================================
  4960.           Author: Paolo Bagnaresi
  4961.                   Via J.F. Kennedy 17
  4962.                   20097 San Donato Milanese
  4963.                   Italy
  4964.  
  4965.           Date:   February 10, 1990
  4966.  
  4967.           Disclaimer: although this document has been written to the
  4968.           best of my knowledge, it may be unaccurate or misleading.
  4969.           It is also unknown to me if the Myarc program burned inside
  4970.           the PAL has been copyrighted. If it has, you may not be
  4971.           allowed to use this document to duplicate the Myarc FDC PAL
  4972.           and usage or distributing of this document may be prohibited
  4973.           by the law. In any case, the informations provided by this
  4974.           document have been entirely worked out without assistance or
  4975.           help from Myarc. 
  4976.  
  4977.           Purpose of this document
  4978.           ------------------------
  4979.  
  4980.           This document will explain the usage of the PAL12L6 chip
  4981.           (National Semiconductor, Monolithic Memories, etc.) located
  4982.           inside the Myarc FDC. 
  4983.  
  4984.           The PAL12L6 is a 20 pin, 12 dedicated inputs, 6
  4985.           combinatorial outputs, Programmable Array Logic.
  4986.  
  4987.           Input pins are pins # 1,2,3,4,5,6,7,8,9,11,12,19.
  4988.           Output pins are pins # 13,14,15,16,17,18.
  4989.  
  4990.           This PAL acts as a "glue logic" inside the Myarc FDC. It
  4991.           has been used by Myarc to enable the following devices
  4992.           inside the FDC:
  4993.  
  4994.           1)  74LS259 when a CRU OUT cycle the CRU address range >1100
  4995.                       - >11FF was executed
  4996.  
  4997.           2)  74LS251 when a CRU IN  cycle the CRU address range >1100
  4998.                       - >11FF was executed
  4999.  
  5000.           3)  2764 Eprom when a Memory cycle in the address range
  5001.                    >4000 - >4FFF was executed
  5002.  
  5003.           4)  2024 Static Ram when a Memory cycle in the address
  5004.                    range >5000 - >57FF was executed
  5005.  
  5006.           5)  WD1770 Read/Write Registers when a Memory cycle in the
  5007.                      address range >5F00 - >5FFF was executed
  5008.  
  5009.           First off, I will describe how the PAL has been programmed.
  5010.           Then, the fuse blowing layout will be translated into a more
  5011.           understandable circuit layout and the suitable explanations
  5012.           will be given. 
  5013.  
  5014.           The following SPRINT XPLOT listing has been obtained by
  5015.           analysing the PAL12L6 of Myarc Floppy Disk Controller by the
  5016.           "SPRINT PAL Programmer". Inspection was possible since Myarc
  5017.           did not blow the Security Fuse on the PAL after
  5018.           programming.
  5019.  
  5020.           The SPRINT XPLOT listing has been provided by Roberto
  5021.           Maffioletti, Via Magellano 8, 24040 Stezzano, Bergamo,       
  5022.  
  5023.           Italy. I would like to thank Roberto for his invaluable
  5024.           help.  
  5025.           *------------------------------------------------------------
  5026.           SPRINT XPLOT listing of device N.S. DMPAL12L6  file
  5027.  
  5028.                      0000 0000 0011 1111 1111 2222 2222 2233
  5029.           term  pin  0123 4567 8901 2345 6789 0123 4567 8901
  5030.  
  5031.           8      18  -XX- X--X -X   -X   -X   -X   ---X --X-
  5032.           9          XXXX XXXX XX   XX   XX   XX   XXXX XXXX
  5033.           10         XXXX XXXX XX   XX   XX   XX   XXXX XXXX
  5034.           11         XXXX XXXX XX   XX   XX   XX   XXXX XXXX
  5035.  
  5036.           16     17  X-X- X--X X-   X-   X-   -X   X--- X--X
  5037.           17         XXXX XXXX XX   XX   XX   XX   XXXX XXXX
  5038.  
  5039.           24     16  -XX- X--X -X   -X   -X   -X   ---- --X-
  5040.           25         XXXX XXXX XX   XX   XX   XX   XXXX XXXX
  5041.  
  5042.           32     15  ---- ---X X-   --   --   -X   ---- X--X
  5043.           33         XXXX XXXX XX   XX   XX   XX   XXXX XXXX
  5044.  
  5045.           40     14  ---- X--X X-   -X   --   -X   ---- X--X
  5046.           41         XXXX XXXX XX   XX   XX   XX   XXXX XXXX
  5047.  
  5048.           48     13  ---- -X-X X-   --   --   -X   ---- X--X
  5049.           49         XXXX XXXX XX   XX   XX   XX   XXXX XXXX
  5050.           50         XXXX XXXX XX   XX   XX   XX   XXXX XXXX
  5051.           51         XXXX XXXX XX   XX   XX   XX   XXXX XXXX
  5052.  
  5053.           Note: X = Fuse not blown
  5054.                 - = Fuse blown
  5055.           *------------------------------------------------------------
  5056.           Now, from the above SPRINT XPLOT listing you can easily
  5057.           build back the Fuse Link Map by marking an "X" on the logic
  5058.           diagram of the PAL12L6 (the diagram has not provided with
  5059.           this document, since its complexity far exceeds the drawing
  5060.           capabilities of TI-Writer). Please refer to the National
  5061.           Semiconductor "PROGRAMMABLE LOGIC DEVICES, Databook and
  5062.           Design Guide", for the PAL12L6 Fuse Link Map Diagram. 
  5063.  
  5064.           From the so otained diagram, we will try to describe to what
  5065.           input pin each output pin in the PAL is connected. 
  5066.  
  5067.           In the following drawing, the AND gate is represented as such
  5068.  
  5069.           I  ---------|\                      Note: the "-----0|" means
  5070.           n  --------0| \                           that the input
  5071.           p  ---------|  )--  Output                signal is negated
  5072.           u  ---------| /                           before being used
  5073.           t  ---------|/                            by the PAL array.
  5074.  
  5075.           Also, the OR gate is represented as such:
  5076.                    \                          \
  5077.           Input  --)>---- Output     Input  --)>0---- Negated Output
  5078.                    /                          /
  5079.           =============================================================
  5080.                                  PAL PIN 18
  5081.                                  ----------
  5082.           Line            Input  AND      OR    Output    Output
  5083.           Name             Pin                   Pin      Description
  5084.  
  5085.           A07_B--------------1---|\                       To G* (pin 14
  5086.           A06_B--------------2--0| \                      Chip Enable)
  5087.           A03----------------3---|  \                     of U10
  5088.           A01----------------4---|   \                    74LS259.
  5089.           A04_B--------------5--0|    \   \
  5090.           A05_B--------------6--0|     )--)>0---Pin # 18
  5091.           A00----------------7--0|    /   /
  5092.           MEMEN*------------11---|   /
  5093.           CRUCLK------------12---|  /
  5094.           A02---------------19---| /
  5095.  
  5096.           Address Lines decode
  5097.           --------------------
  5098.           Address Line #  0123 4567
  5099.           Weight          8421 8421
  5100.           Address value   0001 0001
  5101.           Hex Addr. value >11xx
  5102.  
  5103.           Output pin purpose
  5104.           ------------------
  5105.           Sees if a CRU OUT data bit is aimed to the FDC card.
  5106.           CRU OUT data bit coming from 9900 are accepted by the card
  5107.           if : 
  5108.  
  5109.           a) Address is >11xx in the Address Lines
  5110.           b) MEMEN* is HIGH (inactive)
  5111.           c) CRUCLK* is LOW (active) 
  5112.  
  5113.           =============================================================
  5114.                                  PAL PIN 17
  5115.                                  ----------
  5116.           Line            Input  AND      OR    Output    Output
  5117.           Name             Pin                   Pin      Description
  5118.  
  5119.           A07_B--------------1---|\                       To CS* (pin 1
  5120.           A06_B--------------2---| \                      Chip Enable)
  5121.           A03----------------3---|  \                     of U6 WD1770
  5122.           A01----------------4---|   \                    Floppy Disk
  5123.           A04_B--------------5---|    \   \               Controller.
  5124.           A05_B--------------6---|     )--)>0---Pin # 17
  5125.           A00----------------7--0|    /   /
  5126.           A15_B_CRU_OUT------8---|   /
  5127.           CRU_BIT_ZERO_ON----9---|  /
  5128.           MEMEN*------------11--0| /
  5129.           A02---------------19--0|/
  5130.  
  5131.           Address Lines decode
  5132.           --------------------
  5133.           Address Line #  0123 4567
  5134.           Weight          8421 8421
  5135.           Address value   0101 1111
  5136.           Hex Addr. value >5Fxx
  5137.  
  5138.           Output pin purpose
  5139.           ------------------
  5140.           Sees if a memory cycle (Memory Read/Write) is aimed to the
  5141.           Read/Write Registers of WD1770 chip (Floppy Disk controller) in
  5142.           the FDC card. 
  5143.  
  5144.           Condition is true if:
  5145.           a) Address is >5Fxx in the Address Lines 
  5146.           b) Address is also ODD (not EVEN)
  5147.           c) MEMEN* is LOW (active)
  5148.           d) The card has been already opened. That is, if the CRU BIT
  5149.              ZERO at Base >1100 has been already turned to ON state.  
  5150.  
  5151.           =============================================================
  5152.                                  PAL PIN 16
  5153.                                  ----------
  5154.           Line            Input  AND      OR    Output    Output
  5155.           Name             Pin                   Pin      Description
  5156.  
  5157.           A07_B--------------1---|\                       To STROBE
  5158.           A06_B--------------2--0| \                      (Pin 7) of
  5159.           A03----------------3---|  \                      U5 74LS251
  5160.           A01----------------4--0|   \                    Data Selector
  5161.           A04_B--------------5--0|    \   \
  5162.           A05_B--------------6--0|     )--)>0---Pin # 16
  5163.           A00----------------7--0|    /   /
  5164.           MEMEN*------------11---|   /
  5165.           A02---------------19--0|  /
  5166.                                  | /
  5167.                                  |/
  5168.           Address Lines decode
  5169.           --------------------
  5170.           Address Line #  0123 4567
  5171.           Weight          8421 8421
  5172.           Address value   0001 0001
  5173.           Hex Addr. value >11xx
  5174.  
  5175.           Output pin purpose
  5176.           ------------------
  5177.           Sees if a CRU IN cycle is aimed to the FDC card.
  5178.           Enables sending CRU data bit from the Myarc FDC card to the
  5179.           9900, through the CRUIN data line, if:
  5180.  
  5181.           a) Address is >11xx in the Address Lines
  5182.           b) MEMEN* is HIGH (inactive)
  5183.  
  5184.           Note: in the Myarc FDC card, the CRUIN cycle decoding is
  5185.           equal to the CRUOUT cycle decoding. This means that during a
  5186.           CRUOUT cycle in the >11xx CRU address range the U5 74LS251
  5187.           is selected anyway and a DATA BIT is sent to the 9900 as if
  5188.           CRUIN cycle had been executed. 
  5189.  
  5190.           However, this approach does no harm since the the CRUIN line
  5191.           is a dedicated line and the 9900 simply ignores the bit
  5192.           value being presented on the CRUIN line during a CRUOUT
  5193.           cycle.
  5194.  
  5195.           =============================================================
  5196.                                  PAL PIN 15
  5197.                                  ----------
  5198.           Line            Input  AND      OR    Output    Output
  5199.           Name             Pin                   Pin      Description
  5200.  
  5201.           A01----------------4---|\                    To RDBENA* Bus
  5202.           A00----------------7--0| \   \               Pin in the PEB
  5203.           CRU_BIT_ZERO_ON----9---|  )--)>0---Pin # 15
  5204.           MEMEN*------------11--0| /   /
  5205.           A02---------------19--0|/
  5206.  
  5207.           Address Lines decode
  5208.           --------------------
  5209.           Address Line #  012
  5210.           Weight          842
  5211.           Address value   010
  5212.           Hex Addr. value >4xxx - >5xxx
  5213.  
  5214.           Output pin purpose
  5215.           ------------------
  5216.           Sees if a memory cycle is aimed to the FDC card.  Asserts REMOTE
  5217.           DATA BUS ENABLE (RDBENA*) to its active state (LOW) if:
  5218.  
  5219.           a) Address is in the range >4xxx - >5xxx 
  5220.           b) MEMEN* is LOW (active)
  5221.           c) The card has been already opened. That is, if the CRU BIT
  5222.              ZERO at Base >1100 has been already turned to ON state.  
  5223.  
  5224.           =============================================================
  5225.                                  PAL PIN 14
  5226.                                  ----------
  5227.           Line            Input  AND      OR    Output    Output
  5228.           Name             Pin                   Pin      Description
  5229.  
  5230.           A03----------------3---|\                       To CE* (pin
  5231.           A01----------------4---| \                      18, Chip
  5232.           A04_B--------------5--0|  \   \                 Enable) of
  5233.           A00----------------7--0|   )--)>0---Pin # 14    U2  2016
  5234.           CRU_BIT_ZERO_ON----9---|  /   /                 Static Ram
  5235.           MEMEN*------------11--0| /                      (2 Kbytes)
  5236.           A02---------------19--0|/
  5237.  
  5238.           Address Lines decode
  5239.           --------------------
  5240.           Address Line #  0123 4
  5241.           Weight          8421 8
  5242.           Address value   0101 0
  5243.           Hex Addr. value >50xx - >57xx
  5244.  
  5245.           Output pin purpose
  5246.           ------------------
  5247.           Sees if a memory cycle is aimed to the 2 K Static Ram in FDC
  5248.           card.  Enables the 2 K Static Ram in the address range >50xx -
  5249.           >57xx if:
  5250.  
  5251.           a) Address is in the range >50xx - >57xx 
  5252.           b) MEMEN* is LOW (active)
  5253.           c) The card has been already opened. That is, if the CRU BIT
  5254.              ZERO at Base >1100 has been already turned to ON state.  
  5255.  
  5256.           =============================================================
  5257.                                  PAL PIN 13
  5258.                                  ----------
  5259.           Line            Input  AND      OR    Output    Output
  5260.           Name             Pin                   Pin      Description
  5261.                                  |\
  5262.           A03----------------3--0| \                      To CE* (pin
  5263.           A01----------------4---|  \   \                 20, Chip
  5264.           A00----------------7--0|   )--)>0---Pin # 13    U3  2764
  5265.           CRU_BIT_ZERO_ON----9---|  /   /                 Eprom
  5266.           MEMEN*------------11--0| /                      (8 Kbytes)
  5267.           A02---------------19--0|/
  5268.  
  5269.           Address Lines decode
  5270.           --------------------
  5271.           Address Line #  0123
  5272.           Weight          8421
  5273.           Address value   0100
  5274.           Hex Addr. value >4xxx
  5275.  
  5276.           Output pin purpose
  5277.           ------------------
  5278.           Sees if a memory cycle is aimed to the 8 K Eprom in FDC
  5279.           card.
  5280.  
  5281.           Enables the 8 K Eprom in the address range >4xxx if:
  5282.  
  5283.           a) Address is in the range >4000 - >4FFF
  5284.           b) MEMEN* is LOW (active)
  5285.           c) The card has been already opened. That is, if the CRU BIT
  5286.              ZERO at Base >1100 has been already turned to ON state.  
  5287.  
  5288.           Note: The Eprom is logically divided into two banks, each
  5289.           being 4 KBytes long and each residing in the address range
  5290.           >4000 - >4FFF. When the Eprom is accessed, which Eprom bank
  5291.           will be paged-in depends on the state of CRU OUT Bit # 3,
  5292.           which has also another function: it enables the Double
  5293.           Density when reading/writing from/to Floppy Disk.  
  5294.  
  5295.           This particular hardware arrangements creates a problem:
  5296.           the software residing in the Eprom cannot directly turn
  5297.           on/off the Single/Double Density. If it does, the other
  5298.           Eprom bank may get turned on and the microprocessor would
  5299.           start executing the code residing in the other side of the
  5300.           Eprom.  
  5301.  
  5302.           The problem is software solved by relocating a short portion
  5303.           of code in the Scratch Pad area (>8300 - >83FF) just prior
  5304.           to accessing the Floppy Disk Drive. Then, execution will be
  5305.           transfered to this code relocated in the Scratch Pad area.
  5306.           The selected density can be safely enabled and, after the
  5307.           transfer from/to the Floppy Disk has been carried out, the
  5308.           density pertaining to the Eprom bank being used will be
  5309.           restored to its previous state. Eventually, a return to the
  5310.           original Eprom bank will be performed.
  5311.  
  5312.           Also, it's worth noting that the code relocation to the
  5313.           Scratch Pad area ensures a 16 bit fast execution, as opposed
  5314.           to the 8 bit/wait state/8 bit slow execution that would take
  5315.           place for code executing from inside the Eprom. 
  5316.  
  5317.  
  5318. * Filename : MYARC-FDC1 - Actual code example is on files 80T-INIT-A thru D
  5319. ****************************************************************************
  5320. * MYARC DISK CONTROLLER CRU INFORMATIONS
  5321. ********************************************************************************
  5322.  
  5323. Paolo Bagnaresi 
  5324. Via Kennedy 17 
  5325. 20097 San donato Milanese 
  5326. ITALY - Phone (02)-514.202 
  5327.  
  5328. ********************************************************************************
  5329. The following informations are accurate and to the best of my knowledge.
  5330. However, you should not assume they are free from errors. I will gladly accept
  5331. any correction that you will send to my address. Please feel free to contact me
  5332. on this matter. I am trying to share informations on this subject in the hope
  5333. of receiving some feed back from other users: I would like to know YOUR
  5334. PERSONAL EXPERIENCES. PLEASE WRITE ME BACK.
  5335. ********************************************************************************
  5336.  
  5337. The MYARC Disk Controller (from now on MDC) is a card to be fitted in the PEB.
  5338. It provides DS/DD diskette formatting and some other useful routines.
  5339.  
  5340. This doc deals primarily with the CRU arrangement onf the MDC, that is somehow
  5341. different from TI, ATRONIC and CORCOMP disk Controller.
  5342.  
  5343. The MDC has usually a CRU base address of >1100. Inside, the MDC you can see,
  5344. among the other chips:
  5345.  
  5346. - 1 EPROM 4164 (8 Kbytes)
  5347. - 1 2 Kbyte Ram.
  5348. - 1 WD 1770 Disk controller
  5349.  
  5350. The EPROM is banked into two 4 k portions. Each portion is addressed between
  5351. >4000 and >4FFF. CRU Address >1100 turns on the first bank.
  5352.  
  5353. Additionally, CRU address >1106 turns on the second bank.
  5354.  
  5355. The 2 K Ram is addressed from >5000 to >57FF. Addresses between >5800 - >5EFF
  5356. are unused. Adresses between >5F00 and >5FFF are reserved for I/O mapping (WD
  5357. 1770 gates, see below).
  5358.  
  5359. Banking the 4 K Eprom will not affect the Ram. Thus, the Ram can be "seen" from
  5360. both Eprom banks. This is very convenient. The Ram is used to keep informations
  5361. relevant to drive usage and to save part of the Scracth pad.  Also, the Ram
  5362. will act as temporary Buffer, for a read from disk. 
  5363.  
  5364. The usage of WD 1770 chip (28 pins) is fully described in the WESTERN DIGITAL
  5365. "1986 Storage Management Products Handbook". This is the address of Western
  5366. Digital: 
  5367.  
  5368. WESTERN DIGITAL CORPORATION
  5369. 2445 McCabe Way 
  5370. Irvine, CA 92714, USA
  5371. Phone (714)-863.0102. TWX 910-595-1139
  5372.  
  5373. GATES (HARDWARE MAPPED GATES TO DISK CONTROLLER)
  5374. ================================================
  5375. These are special CPU RAM addresses that act as a gate to and from the disk
  5376. controller WD 1770. They are 8 bits gates (a full byte). Please refer to the
  5377. Western Digital Manual (see above) for a full description on how to use these
  5378. gates.  
  5379.  
  5380. In the following range of addresses, only odd byte addresses between >5F01 and
  5381. >5F07 are fully decoded; other odd address are the copy of odd addresses
  5382. between >5F01 and >5F07: thus, >5F09 should act as >5F01. The even addresses on
  5383. the same range are without effect.
  5384.  
  5385. >5F01 = READ  : STATUS REGISTER. 
  5386.       = WRITE : COMMAND REGISTER.
  5387.  
  5388. >5F03 = WRITE : CURRENT TRACK ADDRESS.
  5389.  
  5390. >5F05 = WRITE : NEEDED SECTOR REGISTER. See a note below.
  5391.  
  5392. >5F07 = READ  : READ DATA GATE
  5393.       = WRITE : WRITE DATA GATE
  5394.  
  5395. In the following descrition the CRU BASE is assumed to be >1100. All SBO, SBZ,
  5396. TB, LDCR, STCR will have >1100 as a CRU BASE.
  5397.  
  5398. TB INSTRUCTIONS (Test Bit istructions)
  5399. ======================================
  5400. CRU
  5401. BASE + 0 =   TB 0 : COMMAND COMPLETED TEST. After issuing a Command to >5F01,
  5402.             COMMAND REGISTER GATE, you may want to check if the command has
  5403.             already been performed . This will avoid issuing a new command
  5404.             before completion of the current command. 
  5405.  
  5406.             The TB will return 1 if Command has been completed, 0 if not
  5407.             completed. Example:
  5408.             TB  0
  5409.             JEQ DONE 
  5410. CRU          
  5411. BASE + 2 =   TB 1 : DATA REQUEST READY TEST. When reading or writing data to
  5412.             the >5F07 READ/WRITE DATA GATE, some time may elapse before the
  5413.             data is processed by the WD 1770 chip. By checking this CRU BIT you
  5414.             will know when a new data is ready to be processed. If a 1 is
  5415.             returned, then the gate is READY to process a new data. If a 0 is
  5416.             returned, the gate is not ready. Example:
  5417.  
  5418.             TB  1
  5419.             JEQ READY
  5420. CRU        
  5421. BASE + 4 =  TB 2 : VERIFY HARD DISABLED if set to ZERO. Myarc suggests to run
  5422.             a jumper, inside the Myarc Disk Controller, between pin # 2 of U5
  5423.             [a 74LS251] and ground to disable VERIFY after a write. The means
  5424.             for the software to detected if this jumper has been run is a TB 2.
  5425.             The only time this bit is tested is after a Write Sector.  
  5426.  
  5427.             Example :
  5428.             TB  2
  5429.             JNE DISABL  (Jump if Verify is DISABLed)
  5430.  
  5431. BASE + 6 =  TB 3 : ?? unknown. Apparently is never used.
  5432.  
  5433. CRU        
  5434. BASE + 8 =  TB 4 : DRIVE # 4 80 TRACK DIP-SWITCH SELECTED TEST. This CRU Bit
  5435.             reflects the condition of the internal Dip-Switch # 4, relative to
  5436.             drive # 4 (can be either on ON or on OFF position). It returns 1 if
  5437.             the dip-switch is OFF, 0 if the dip-switch is ON. The dip-switch
  5438.             has to be turned on if the corresponding drive is an 80 track drive
  5439.             (such as TEAC FD 55 F).  Please note that this CRU BIT depends only
  5440.             on the position of the corresponding Dip-Switch: it is not capable
  5441.             of really detecting the kind of drive connected. In other words, it
  5442.             is entirely possible that user has a 40 track drive and by mistake
  5443.             turned on the dip-switch: then the softwre will act as if an 80
  5444.             track is connected .... with all the problem you can easily
  5445.             imagine.
  5446.  
  5447.             Example : 
  5448.             TB  4
  5449.             JNE TRAK80 jump if DIP-SWITCH is OFF.
  5450.  
  5451. CRU        
  5452. BASE + 10 = TB 5 : DRIVE # 3 80 TRACK DIP-SWITCH SELECTED TEST. This CRU bit
  5453.                  reflects the condition of the internal Dip-Switch # 3,
  5454.                  relative to drive # 3 (can be either on ON or on OFF
  5455.                  position). It returns 1 if the dip-switch is OFF, 0 if the
  5456.                  dip-switch is ON. See explanations for TB 4.  
  5457.  
  5458.             Example: 
  5459.             TB  5
  5460.             JNE TRAK80 jump if DIP-SWITCH is OFF.
  5461.  
  5462. CRU        
  5463. BASE + 12 = TB 6 : DRIVE # 2 80 TRACK DIP-SWITCH SELECTED TEST. This CRU bit
  5464.                  reflects the condition of the internal Dip-Switch # 2,
  5465.                  relative to drive # 2 (can be either on ON or on OFF
  5466.                  position). It returns 1 if the dip-switch is OFF, 0 if the
  5467.                  dip-switch is ON. See explanations for TB 4.  
  5468.  
  5469.             Example: 
  5470.             TB  6
  5471.             JNE TRAK80 jump if DIP-SWITCH is OFF.
  5472.  
  5473. CRU        
  5474. BASE + 14 = TB 7 : DRIVE # 1 80 TRACK DIP-SWITCH SELECTED TEST. This CRU bit
  5475.                  reflects the condition of the internal Dip-Switch # 1,
  5476.                  relative to drive # 1 (can be either on ON or on OFF
  5477.                  position). It returns 1 if the dip-switch is OFF, 0 if the
  5478.                  dip-switch is ON. See explanations for TB 4.  
  5479.  
  5480.             Example: 
  5481.             TB  7
  5482.             JNE TRAK80 jump if DIP-SWITCH is OFF.
  5483.  
  5484. SBO, SBZ INSTRUCTIONS (Set cru Bit to One, Set cru Bit to Zero)
  5485. ===============================================================
  5486.  
  5487. CRU        
  5488. BASE + 0  = SBO 0 : ENABLE  MYARC DSR CARD 
  5489.             SBZ 0 : DISABLE MYARC DSR CARD 
  5490.  
  5491. CRU         
  5492. BASE + 2  = SBO 1 : ?? (may be WD 1770 Chip Enable)
  5493.             SBZ 1 : ?? ( "   "  "   "  Chip Disable)
  5494.  
  5495. CRU         
  5496. BASE + 4  = SBO 2 : ENABLE SECOND SIDE OF MAGNETIC HEAD
  5497.             SBZ 2 : ENABLE FIRST  SIDE OF MAGNETIC HEAD
  5498.  
  5499. CRU         
  5500. BASE + 6  = SBO 3 : ENABLE SINGLE DENSITY AND BANK 2 OF EPROM MEMORY ADDRESSES
  5501.                     BETWEEN >4000 AND >4FFF.
  5502.             SBZ 3 : ENABLE DOUBLE DENSITY AND BANK 1
  5503.                     BETWEEN >4000 AND >4FFF.
  5504.  
  5505. CRU         
  5506. BASE + 8  = SBO 4 : ENABLE  DRIVE # 1 
  5507.             SBZ 4 : DISABLE DRIVE # 1 
  5508.  
  5509. CRU         
  5510. BASE + 10 = SBO 5 : ENABLE  DRIVE # 2 
  5511.             SBZ 5 : DISABLE DRIVE # 2 
  5512.  
  5513. CRU         
  5514. BASE + 12 = SBO 6 : ENABLE  DRIVE # 3 
  5515.             SBZ 6 : DISABLE DRIVE # 3 
  5516.  
  5517. CRU         
  5518. BASE + 14 = SBO 7 : ENABLE  DRIVE # 4 
  5519.             SBZ 7 : DISABLE DRIVE # 4 
  5520.  
  5521. >5F05 GATE (HARDWARE MAPPED SECTOR GATE TO DISK CONTROLLER)
  5522. ===========================================================
  5523. The sector # to write to disk Gate is the sector # relative to the track
  5524. (INTERNAL SECTOR #). When a diskette is initialized, each track contains
  5525. several sectors (they span from 0 up to either 9 or 18, depending on the
  5526. density you are using). So, in each track, the sector # is numbered from 0 up
  5527. to 18. When accessing a LOGICAL sector number, say sector LOGICAL SECTOR # 70,
  5528. you have to compute the corrisponding TRACK # and INTERNAL SECTOR #.  For
  5529. instance, if the diskette has been initialized to 18 sectors, then
  5530.  
  5531. LOGICAL SECTOR 70 is = TRACK # 3 (Integer of 70/18)
  5532.                      = INTERNAL SECTOR 16 (Remainder of 70/18)
  5533.                        Thus, you will write 16 to the >5F05 SECTOR GATE and
  5534.                        3 to the >5F03 TRACK GATE.
  5535.  
  5536. INTERNAL RAM ORGANIZATION
  5537. =========================
  5538. As said above, the 2 K RAM inside the MDC (>5000 - >57FF) it is used to store
  5539. information relevant to Disk Management.
  5540.  
  5541. The following map is a partial description of the use of this RAM. Further
  5542. infos are needed to complete the map. Please help!
  5543.  
  5544. >5000 - >501F  = Workspace used by Sector READ/WRITE and Disk FORMATTING.
  5545.  
  5546. >5020 - >508B  = Save SCRATCH PAD HIGH AREA (>6C bytes from >8394 through
  5547.                  >83FE). 
  5548.  
  5549. >508C - >50AE  = Subprogram or Program invoked by the DSRLNK. Here will be
  5550.                  stored the Subprogram you call (Ex. >0111 for a Disk
  5551.                  Formatting routine), or a full PAB description if you call a
  5552.                  Program (>0500,>1000,>0000,>2100,>000A,'DSK1.UTIL1' for a LOAD
  5553.                  MEMORY IMAGE PROGRAM of a file 'UTIL1' from Drive 1).
  5554.  
  5555. >50AF -        = Byte: # of maximum RETRY during a READ/WRITE sector. It is
  5556.                  initialized to 5 upon entering the READ/WRITE sector routine.
  5557.                  The Read/Write Sector software will enable retrying 5 times
  5558.                  before issuing error when accessing a sector. A LOST DATA
  5559.                  during a read or a write sector will not modify this value
  5560.                  (you still have 5 more chances). After a Write Sector error,
  5561.                  Sector Zero of the diskette is read. If a new error is issued
  5562.                  after reading sector Zero, then DENSITY value is changed and
  5563.                  sector Zero is accessed again. This DENSITY swapping and
  5564.                  reding Sector ZERO is continued until either sector zero is
  5565.                  read succesfully, or RETRY times remains greater than ZERO.
  5566.                  After that, a final error is issued to the routine that called
  5567.                  the READ/WRITE sector..
  5568.  
  5569.                  On the other hand, if Sector Zero is read succesfully, then
  5570.                  the original assigned sector is accessed again. A new error
  5571.                  will restart the ZERO READ SECTOR PROCEDURE.
  5572.  
  5573. >50B0 - >50B1  = Drive # accessed (at >50B1).  Usually >50B0 is zero.
  5574.  
  5575. >50B2          = Byte: if 0 then SECTOR ZERO doesn't need to be updated. If
  5576.                  different from zero, then SECTOR ZERO needs updating.
  5577.  
  5578. >50B3          = Byte: Drive # previously accessed. After computer RESET
  5579.                  is always zero. 
  5580.  
  5581. >50B4 - >50B5  = unknown
  5582.  
  5583. *----- DISKETTE TYPE INFORMATION AREA ---------------------------------------*
  5584.  
  5585. *----- DRIVE 1 -----*
  5586.  
  5587. >50B6 - >50B7    = Word: Drive 1 Maximum # of sector/disk. This value is taken
  5588.                  from sector ZERO, offset >10, of the diskette you are using.
  5589.                  It is always updated whenever you access sector ZERO.
  5590.  
  5591.                  It will be:
  5592.                  >0168 for 360 sectors 
  5593.                  >0280  "   640    "
  5594.                  >02D0  "   720    "
  5595.                  >0500  "  1280    "
  5596.                  >05A0  "  1400    "
  5597.                  >0A00  "  2560    "
  5598.                  >0B40  "  2880    "
  5599.  
  5600. >50B8          = Byte: Flag for Drive # 1 when an 80 Track Drive is used with a
  5601.                  40 track diskette. If the Most Significant Bit of this byte is
  5602.                  set to 1, then the drive is an 80 track drive, but the
  5603.                  diskette is a 40 track diskette. In other words, this bit flag
  5604.                  enables double step of magnetic head in read a write
  5605.                  operations.  
  5606.  
  5607. >50B9            = Byte: Drive 1 SECTOR/TRACK. Usually is either >09 (Single
  5608.                  Density, or >10 (Double Density 16 Sector/Track) or >12 (Double
  5609.                  Density 18 Sector/Track).
  5610.                  
  5611. *----- DRIVE 2 -----*
  5612.  
  5613. >50BA - >50BB    = Word: Drive 2 Maximum # of sector/disk. This value is taken
  5614.                  from sector ZERO, offset >10, of the diskette you are using.
  5615.                  It is always updated whenever you access sector ZERO.
  5616.  
  5617.                  It will be:
  5618.                  >0168 for 360 sectors 
  5619.                  >0280  "   640    "
  5620.                  >02D0  "   720    "
  5621.                  >0500  "  1280    "
  5622.                  >05A0  "  1400    "
  5623.                  >0A00  "  2560    "
  5624.                  >0B40  "  2880    "
  5625.  
  5626. >50BC          = Byte: Flag for Drive # 2 when an 80 Track Drive is used with a
  5627.                  40 track diskette. If the Most Significant Bit of this byte is
  5628.                  set to 1, then the drive is an 80 track drive, but the
  5629.                  diskette is a 40 track diskette. In other words, this bit flag
  5630.                  enables double step of magnetic head in read a write
  5631.                  operations.  
  5632.  
  5633. >50BD            = Byte: Drive 2 SECTOR/TRACK. Usually is either >09 (Single
  5634.                  Density, or >10 (Double Density 16 Sector/Track) or >12 (Double
  5635.                  Density 18 Sector/Track).
  5636.  
  5637. *----- DRIVE 3 -----*
  5638.  
  5639. >50BE - >50BF    = Word: Drive 3 Maximum # of sector/disk. This value is taken
  5640.                  from sector ZERO, offset >10, of the diskette you are using.
  5641.                  It is always updated whenever you access sector ZERO.
  5642.  
  5643.                  It will be:
  5644.                  >0168 for 360 sectors 
  5645.                  >0280  "   640    "
  5646.                  >02D0  "   720    "
  5647.                  >0500  "  1280    "
  5648.                  >05A0  "  1400    "
  5649.                  >0A00  "  2560    "
  5650.                  >0B40  "  2880    "
  5651.  
  5652. >50C0          = Byte: Flag for Drive # 3 when an 80 Track Drive is used with a
  5653.                  40 track diskette. If the Most Significant Bit of this byte is
  5654.                  set to 1, then the drive is an 80 track drive, but the
  5655.                  diskette is a 40 track diskette. In other words, this bit flag
  5656.                  enables double step of magnetic head in read a write
  5657.                  operations.  
  5658.  
  5659. >50C1            = Byte: Drive 3 SECTOR/TRACK. Usually is either >09 (Single
  5660.                  Density, or >10 (Double Density 16 Sector/Track) or >12 (Double
  5661.                  Density 18 Sector/Track).
  5662.  
  5663. *----- DRIVE 4 -----*
  5664.  
  5665. >50C2 - >50C3    = Word: Drive 4 Maximum # of sector/disk. This value is taken
  5666.                  from sector ZERO, offset >10, of the diskette you are using.
  5667.                  It is always updated whenever you access sector ZERO.
  5668.  
  5669.                  It will be:
  5670.                  >0168 for 360 sectors 
  5671.                  >0280  "   640    "
  5672.                  >02D0  "   720    "
  5673.                  >0500  "  1280    "
  5674.                  >05A0  "  1400    "
  5675.                  >0A00  "  2560    "
  5676.                  >0B40  "  2880    "
  5677.  
  5678. >50C4          = Byte: Flag for Drive # 4 when an 80 Track Drive is used with a
  5679.                  40 track diskette. If the Most Significant Bit of this byte is
  5680.                  set to 1, then the drive is an 80 track drive, but the
  5681.                  diskette is a 40 track diskette. In other words, this bit flag
  5682.                  enables double step of magnetic head in read a write
  5683.                  operations.  
  5684.  
  5685. >50C5            = Byte: Drive 4 SECTOR/TRACK. Usually is either >09 (Single
  5686.                  Density, or >10 (Double Density 16 Sector/Track) or >12 (Double
  5687.                  Density 18 Sector/Track).
  5688.                  
  5689. *------ LAST TRACK ACCESSED
  5690. >50C6            = Byte: Last track accessed of Drive # 1
  5691. >50C7            = Byte:  "     "      "     of Drive # 2
  5692. >50C8            = Byte:  "     "      "     of Drive # 3
  5693. >50C9            = Byte:  "     "      "     of Drive # 4
  5694. *-----------------------------------------------------------------------------*
  5695.  
  5696. >50CA            = Word: DSRLNK (or EPROM bank 1) RETURN ADDRESS 
  5697.  
  5698. >50CC            = Byte: Flag. If ZERO, the the diskette has been previously
  5699.                  accessed. If different from ZERO, then the diskette is handled
  5700.                  as if it was never been accessed previously: therefore Sector
  5701.                  zero is Read and the DISKETTE TYPE INFORMATION AREA is
  5702.                  updated.  Also, this byte is <>0 after a Read/Write sector
  5703.                  error.
  5704.  
  5705. >50CD            = Byte: Flag. HARD VERIFY DISABLED. It reflects the condition
  5706.                  of CRU bit 2 after a TB (TB 2). If ZERO, then VERIFY is
  5707.                  ENABLED.
  5708.  
  5709.                  PLEASE NOTE THAT A VERIFY IN MYARC DC ONLY IMPLIES READING
  5710.                  BACK THE GIVEN SECTOR (to >4000 EPROM, a "deaf" area!). No
  5711.                  match between the diskette sector content and the BUFFER area
  5712.                  is ever performed This, in my opinion, is a strange approach.
  5713.                  Myarc approach is entirely different from TI and CORCOMP, that
  5714.                  do allow checking of the written sector against the BUFFER
  5715.                  content. The Myarc Verify is based only on CRC, LOST DATA,
  5716.                  SECTOR NOT FOUND ERRORS. It does not ensure that all the bytes
  5717.                  you have passed to the diskette have been really written on
  5718.                  the diskette. If, by any means, you bump into an hardware or
  5719.                  software failure AND a different sector is accessed, NO ERROR
  5720.                  IS EVER REPORTED!
  5721.  
  5722.                  If the >50CD byte is different from ZERO, then VERIFY is
  5723.                  disabled.
  5724.  
  5725. >50CE            = Byte: Flag. If ZERO, then the Read/Write sector and
  5726.                  Initialize routnes will use the VPD RAM BUFFER.
  5727.  
  5728.                  If different from ZERO, then the same routines will use a CPU
  5729.                  RAM BUFFER (pointed, as usual, by the sane address in the FAC
  5730.                  area. This way is faster than having to deal with VPD buffer.
  5731.  
  5732. >50CF -        = Byte: # of maximum files you can open from Basic or Assembler.
  5733.                  It is the # of Files you want to allow with a CALL FILES from
  5734.                  Basic.
  5735.  
  5736. Paolo Bagnaresi, Via J.F. Kennedy 17, San Donato Milanese, Italy    ~- % ~-
  5737. File name : MYARC-FDC2     Stored on disk TECH-NOTES
  5738.  
  5739. * Filename : MYARC-FDC2 - Actual code example is on files 80T-INIT-A thru D
  5740. ****************************************************************************
  5741. * MYARC DISK CONTROLLER INFORMATIONS 
  5742. ********************************************************************************
  5743.  
  5744. Paolo Bagnaresi 
  5745. Via Kennedy 17 
  5746. 20097 San donato Milanese 
  5747. ITALY - Phone (02)-514.202 
  5748.  
  5749. ********************************************************************************
  5750. INTERNAL RAM ORGANIZATION (follows from previous file)
  5751. =========================
  5752.  
  5753. >50D0 - >51CF  = >100 bytes taken from sector ZERO of the diskette last
  5754.                  accessed. This is the standard layout of sector ZERO.
  5755.  
  5756. >50D0 - >50D9  = 10 bytes: DISKNAME, padded to the right with blancks.
  5757.  
  5758. >50DA - >50DB  = Total sector/disk:
  5759.                  >0168 for 360 sectors 
  5760.                  >0280  "   640    "
  5761.                  >02D0  "   720    "
  5762.                  >0500  "  1280    "
  5763.                  >05A0  "  1400    "
  5764.                  >0A00  "  2560    "
  5765.                  >0B40  "  2880    "
  5766.  
  5767. >50DC          = Byte: Sector/Track.
  5768.                  - >09 = 9 (Single Density)
  5769.                  - >10 = 16 (Double Density Myarc)
  5770.                  - >12 = 18 (Double Density Myarc or CorComp).
  5771.  
  5772. >50DD - >50DF  = 3 Bytes: 'DSK' identifier.
  5773.  
  5774. >50E0          = Byte: Disk Proprietary Protection
  5775.                  >20 -> Not protected, >50 Protected.
  5776.  
  5777. >50E1          = Byte: Track/Side. Usually either >28 (40 Track) or >50 (80
  5778.                  Track).
  5779.  
  5780. >50E2          = Byte: Disk Side.    >01 Single Side,    >02 Double Side.
  5781.  
  5782. >50E3          = Byte: Disk Density. >01 Single Density, >02 Double Density.
  5783.  
  5784. >50E4 - >5107  = All >0000. Reserved area.
  5785.  
  5786. >5018 ..>51CF  = Used sector bit map. The actual lenght depends on a
  5787.                  side/density factor. There are:
  5788.  
  5789.                  >2D (45)  bytes for Single Side/Single Dens. ( 9 Sector/Track)
  5790.                  >5A (90)    "    "  Double   " /  "      "   ( 9   "   /  "  )
  5791.                  >5A (90)    "    "  Single   " /Double   "   (18   "   /  "  )
  5792.                  >A0 (160)   "    "  Double   " /  "      "   (16   "   /  "  )
  5793.                  >B4 (180)   "    "    "      " /  "      "   (18   "   /  "  )
  5794.                  
  5795. DISK BUFFERING AREA: The last FILE CONTROL BLOCK # available is always used
  5796. before the others.
  5797. *******************
  5798.  
  5799. 1st FILE CONTROL BLOCK= >108 bytes: 8 bytes for description, >100 bytes sector
  5800. -------------------------------------------------------------------------------
  5801.  
  5802. >50D0          = Byte: EOF offset for DIS/VAR type file. It will be zeroed when
  5803.                  the file is closed.
  5804.  
  5805. >51D1          = Byte: Drive # used, real number. It will be zeroed when the
  5806.                  file is closed.
  5807.  
  5808. >51D2 - >52D3  = Sector # where the NAME OF THE FILE is kept.
  5809.  
  5810. >51D4 - >50D5  = Word: The first nibble is the FILE/TYPE.  The second nibble,
  5811.                  and the second byte, together, point to the last used sector.
  5812.  
  5813. >51D6 - >51D7  = Word: Total sectors engaged for this file.
  5814.  
  5815. >51D8 - >52D7  = >100 bytes brought directly from the NAME OF THE FILE sector.
  5816.                  OFFSET
  5817.  
  5818. >51D8 - >51E1  = >00 10 Bytes= FILENAME
  5819. >51E2 - >51E3  = >0A Word    = >0000   = Reserved 
  5820.  
  5821. >51E4          = >0C Byte    = File Status Flag (File Type and Write
  5822.                                Protection) 
  5823.  
  5824. >51E5          = >0D Byte    = Max # of records per Sector = >03 for a 80
  5825.                                DIS/VAR file. 
  5826.  
  5827. >51E6 - >51E7  = >0E Word    = Number of sectors currently allocated.
  5828.  
  5829. >51E8          = >10 Byte    = End Of File offset within the last used sector.
  5830. >51E9          = >11 Byte    = Logical Record Length. >50 for a DIS/VAR 80
  5831.                                file.  
  5832.  
  5833. >51EA - >51EB  = >12 Word    = # of FIXED length records or # of sectors for
  5834.                                VARIABLE length (the bytes are reversed, LSB|MSB
  5835.                                should be MSB|LSB.  
  5836.  
  5837. >51EC - >51F3  = >14 4 Words = >0000,>0000,>0000,>0000 : Reserved.
  5838. >51F4 - >51F6  = >1C 3 Bytes = Sector # of first sector and # of following
  5839.                                sectors. Nibble are reversed. Also, if next
  5840.                                3 bytes are not zero, fracturing map.
  5841.  
  5842. 2nd FILE CONTROL BLOCK = >108 bytes: 8 bytes for description, >100 bytes sector
  5843. -------------------------------------------------------------------------------
  5844.  
  5845. >52D8          = Byte: EOF offset for DIS/VAR type file. It will be zeroed when
  5846.                  the file is closed.
  5847.  
  5848. >52D9          = Byte: Drive # used, real number. It will be zeroed when the
  5849.                  file is closed.
  5850. >52DA - >52DB  = Sector # where the NAME OF THE FILE is kept.
  5851.  
  5852. >52DC - >50DD  = Word: The first nibble is the FILE/TYPE.  The second nibble,
  5853.                  and the second byte, together, point to the last used sector.
  5854.  
  5855. >52DE - >52DF  = Word: Total sectors engaged for this file.
  5856.  
  5857. >52E0 - >53DF  = >100 bytes brought directly from the NAME OF THE FILE sector.
  5858.                  OFFSET
  5859.  
  5860. >52E0 - >52E9  = >00 10 Bytes= FILENAME
  5861. >52EA - >52EB  = >0A Word    = >0000   = Reserved 
  5862.  
  5863. >52EC            >0C Byte    = File Status Flag (File Type and Write
  5864.                                Protection) 
  5865.  
  5866. >52ED          = >0D Byte    = Max # of records per Sector = >03 for a 80
  5867.                                DIS/VAR file. 
  5868.  
  5869. >52EE - >52EF  = >0E Word    = Number of sectors currently allocated.
  5870.  
  5871. >52F0          = >10 Byte    = End Of File offset within the last used sector.
  5872. >52F1          = >11 Byte    = Logical Record Length. >50 for a DIS/VAR 80
  5873.                                file.  
  5874.  
  5875. >52F2 - >52F3  = >12 Word    = # of FIXED length records or # of sectors for
  5876.                                VARIABLE length (the bytes are reversed, LSB|MSB
  5877.                                should be MSB|LSB.  
  5878.  
  5879. >52F4 - >52FB  = >14 4 Words = >0000,>0000,>0000,>0000 : Reserved.
  5880. >52FC - >52FE  = >1C 3 Bytes = Sector # of first sector and # of following
  5881.                                sectors. Nibble are reversed. Also, if next
  5882.                                3 bytes are not zero, fracturing map.
  5883.  
  5884. 3rd FILE CONTROL BLOCK = >108 bytes: 8 bytes for description, >100 bytes sector
  5885. -------------------------------------------------------------------------------
  5886.  
  5887. >53E0          = Byte: EOF offset for DIS/VAR type file. It will be zeroed when
  5888.                  the file is closed.
  5889.  
  5890. >53E1          = Byte: Drive # used, real number. It will be zeroed when the
  5891.                  file is closed.
  5892.  
  5893. >53E2 - >53E3  = Sector # where the NAME OF THE FILE is kept.
  5894.  
  5895. >53E4 - >53E5  = Word: The first nibble is the FILE/TYPE.  The second nibble,
  5896.                  and the second byte, together, point to the last used sector.
  5897.  
  5898. >53E6 - >53E7  = Word: Total sectors engaged for this file.
  5899.  
  5900. >53E8 - >54E7  = >100 bytes brought directly from the NAME OF THE FILE sector.
  5901.  
  5902.                  OFFSET
  5903.  
  5904. >53E8 - >53F1  = >00 10 Bytes= FILENAME
  5905. >53F2 - >53F3  = >0A Word    = >0000   = Reserved 
  5906.  
  5907. >53F4          = >0C Byte    = File Status Flag (File Type and Write
  5908.                                Protection) 
  5909.  
  5910. >53F5          = >0D Byte    = Max # of records per Sector = >03 for a 80
  5911.                                DIS/VAR file. 
  5912.  
  5913. >53F6 - >53F7  = >0E Word    = Number of sectors currently allocated.
  5914.  
  5915. >53F8          = >10 Byte    = End Of File offset within the last used sector.
  5916. >53F9          = >11 Byte    = Logical Record Length. >50 for a DIS/VAR 80
  5917.                                file.  
  5918.  
  5919. >53FA - >53FB  = >12 Word    = # of FIXED length records or # of sectors for
  5920.                                VARIABLE length (the bytes are reversed, LSB|MSB
  5921.                                should be MSB|LSB.  
  5922.  
  5923. >53FC - >5403  = >14 4 Words = >0000,>0000,>0000,>0000 : Reserved.
  5924. >5404 - >5406  = >1C 3 Bytes = Sector # of first sector and # of following
  5925.                                sectors. Nibble are reversed. Also, if next
  5926.                                3 bytes are not zero, fracturing map.
  5927.  
  5928. 4th FILE CONTROL BLOCK = >108 bytes: 8 bytes for description, >100 bytes sector
  5929. -------------------------------------------------------------------------------
  5930.  
  5931. >54E8          = Byte: EOF offset for DIS/VAR type file. It will be zeroed when
  5932.                  the file is closed.
  5933.  
  5934. >54E9          = Byte: Drive # used, real number. It will be zeroed when the
  5935.                  file is closed.
  5936. >54EA - >54EB  = Sector # where the NAME OF THE FILE is kept.
  5937.  
  5938. >54EC - >54ED  = Word: The first nibble is the FILE/TYPE.  The second nibble,
  5939.                  and the second byte, together, point to the last used sector.
  5940.  
  5941. >54EE - >54EF  = Word: Total sectors engaged for this file.
  5942.  
  5943. >54F0 - >55EF  = >100 bytes brought directly from the NAME OF THE FILE sector.
  5944.  
  5945.                  OFFSET
  5946.  
  5947. >54F0 - >54F9  = >00 10 Bytes= FILENAME
  5948. >54FA - >54FB  = >0A Word    = >0000   = Reserved 
  5949.  
  5950. >54FC            >0C Byte    = File Status Flag (File Type and Write
  5951.                                Protection) 
  5952.  
  5953. >54FD          = >0D Byte    = Max # of records per Sector = >03 for a 80
  5954.                                DIS/VAR file. 
  5955.  
  5956. >54FE - >54FF  = >0E Word    = Number of sectors currently allocated.
  5957.  
  5958. >5500          = >10 Byte    = End Of File offset within the last used sector.
  5959. >5501          = >11 Byte    = Logical Record Length. >50 for a DIS/VAR 80
  5960.                                file.  
  5961.  
  5962. >5502 - >5503  = >12 Word    = # of FIXED length records or # of sectors for
  5963.                                VARIABLE length (the bytes are reversed, LSB|MSB
  5964.                                should be MSB|LSB.  
  5965.  
  5966. >5504 - >550B  = >14 4 Words = >0000,>0000,>0000,>0000 : Reserved.
  5967. >550C - >550E  = >1C 3 Bytes = Sector # of first sector and # of following
  5968.                                sectors. Nibble are reversed. Also, if next
  5969.                                3 bytes are not zero, fracturing map.
  5970.  
  5971. 5th FILE CONTROL BLOCK = >108 bytes: 8 bytes for description, >100 bytes sector
  5972. -------------------------------------------------------------------------------
  5973.  
  5974. >55F0          = Byte: EOF offset for DIS/VAR type file. It will be zeroed when
  5975.                  the file is closed.
  5976.  
  5977. >55F1          = Byte: Drive # used, real number. It will be zeroed when the
  5978.                  file is closed.
  5979. >55F2 - >55F3  = Sector # where the NAME OF THE FILE is kept.
  5980.  
  5981. >55F4 - >55F5  = Word: The first nibble is the FILE/TYPE.  The second nibble,
  5982.                  and the second byte, together, point to the last used sector.
  5983.  
  5984. >55F6 - >55F7  = Word: Total sectors engaged for this file.
  5985.  
  5986. >55F8 - >56F7  = >100 bytes brought directly from the NAME OF THE FILE sector.
  5987.  
  5988.                  OFFSET
  5989.  
  5990. >55F8 - >5601  = >00 10 Bytes= FILENAME
  5991. >5602 - >5603  = >0A Word    = >0000   = Reserved 
  5992.  
  5993. >5604          = >0C Byte    = File Status Flag (File Type and Write
  5994.                                Protection) 
  5995.  
  5996. >5605          = >0D Byte    = Max # of records per Sector = >03 for a 80
  5997.                                DIS/VAR file. 
  5998.  
  5999. >5606 - >5607  = >0E Word    = Number of sectors currently allocated.
  6000.  
  6001. >5608          = >10 Byte    = End Of File offset within the last used sector.
  6002. >5609          = >11 Byte    = Logical Record Length. >50 for a DIS/VAR 80
  6003.                                file.  
  6004.  
  6005. >560A - >560B  = >12 Word    = # of FIXED length records or # of sectors for
  6006.                                VARIABLE length (the bytes are reversed, LSB|MSB
  6007.                                should be MSB|LSB.  
  6008.  
  6009. >560C - >5613  = >14 4 Words = >0000,>0000,>0000,>0000 : Reserved.
  6010. >5614 - >5616  = >1C 3 Bytes = Sector # of first sector and # of following
  6011.                                sectors. Nibble are reversed. Also, if next
  6012.                                3 bytes are not zero, fracturing map.
  6013.  
  6014. 6th FILE CONTROL BLOCK = >108 bytes: 8 bytes for description, >100 bytes sector
  6015. -------------------------------------------------------------------------------
  6016.  
  6017. >56F8          = Byte: EOF offset for DIS/VAR type file. It will be zeroed when
  6018.                  the file is closed.
  6019.  
  6020. >56F9          = Byte: Drive # used, real number. It will be zeroed when the
  6021.                  file is closed.
  6022. >56FA - >56FB  = Sector # where the NAME OF THE FILE is kept.
  6023.  
  6024. >56FC - >56FD  = Word: The first nibble is the FILE/TYPE.  The second nibble,
  6025.                  and the second byte, together, point to the last used sector.
  6026.  
  6027. >56FE - >56FF  = Word: Total sectors engaged for this file.
  6028.  
  6029. >5700 - >57FF  = >100 bytes brought directly from the NAME OF THE FILE sector.
  6030.                  
  6031.                  OFFSET
  6032.  
  6033. >5700 - >5709  = >00 10 Bytes= FILENAME
  6034. >570A - >570B  = >0A Word    = >0000   = Reserved 
  6035.  
  6036. >570C            >0C Byte    = File Status Flag (File Type and Write
  6037.                                Protection) 
  6038.  
  6039. >570D          = >0D Byte    = Max # of records per Sector = >03 for a 80
  6040.                                DIS/VAR file. 
  6041.  
  6042. >570E - >570F  = >0E Word    = Number of sectors currently allocated.
  6043.  
  6044. >5710          = >10 Byte    = End Of File offset within the last used sector.
  6045. >5711          = >11 Byte    = Logical Record Length. >50 for a DIS/VAR 80
  6046.                                file.  
  6047.  
  6048. >5712 - >5713  = >12 Word    = # of FIXED length records or # of sectors for
  6049.                                VARIABLE length (the bytes are reversed, LSB|MSB
  6050.                                should be MSB|LSB.  
  6051.  
  6052. >5714 - >571B  = >14 4 Words = >0000,>0000,>0000,>0000 : Reserved.
  6053. >571C - >571E  = >1C 3 Bytes = Sector # of first sector and # of following
  6054.                                sectors. Nibble are reversed. Also, if next
  6055.                                3 bytes are not zero, fracturing map.
  6056.  
  6057. ********************************************************************************
  6058. >577F  Note    = Last location in Myarc FDC RAM.
  6059.  
  6060. ------------------------------------------------------------------------------
  6061. DTIHM039
  6062.  
  6063. DX-10 Opcodes and Mnemonics.
  6064.  
  6065. [EDITORS NOTE: DX-10 was the operating system used by Texas Instruments 990
  6066.                series of Minicomputers. Besides being (mostly) compatable 
  6067.                with the 99/4a on the assembly level, much software and 
  6068.                hardware development for the 99/4a was done on the mini 
  6069.                computers. ]
  6070.  
  6071. THE FOLLOWING TEXT DEFINES ALL THE POSSIBLE TAGS FOUND IN A DX/10 OBJECT FILE:
  6072.  -------------------------------------------------------------------------------
  6073. Field 1: Is always 4 bytes long, and contains a Value or Address in ASCII-HEX.
  6074.          But if it is compressed object code, this field is compressed down to
  6075.          2 bytes and the data is stored in internal BINARY-WORD format.
  6076.  
  6077. Field 2: Is always 6 bytes long, and contains Symbol characters, except for its
  6078.          use in the first record of the object file and the first TAG of `0'.
  6079.          During this use, this field is expanded by two bytes, to make room for
  6080.          the 8 byte long `PROGRAM ID' text.
  6081.  
  6082. Field 3: Is always 4 bytes long, and contains a Module No. from >0000 to >0FFF.
  6083.          Start at >0000 for all DATA segments (DSEG) in the source files. The
  6084.          next Module No. >0001 is for all PROGRAM segments (PSEG), but since it
  6085.          is the default mode for all of the OBJECT code,it is never included in
  6086.          any TAG field. The rest of the Module Numbers from>0002 up until >0FFF
  6087.          are for all the different COMMON segments (CSEG). Each COMMON segment
  6088.          with a different Field 2 (Symbol) is assigned a new Module Number. The
  6089.          number of COMMON segments allowed varies depending on the amount of
  6090.          memory available for the Assembler. Linker and Loader programs; but if
  6091.          it is compressed OBJECT code, this field is compressed down to 2 bytes
  6092.          and the Module Number is stored in internal BINARY-WORD format.
  6093.  
  6094. -------------------------------------------------------------------------------
  6095. SPECIAL TAGs: The 7,8,F,: TAGs are designed to control the file format of the
  6096.               OBJECT file, and are used to check for errors in the last record,
  6097.               and to mark the ends of each file,and the end of the OBJECT file.
  6098.               The `U' TAG is generated by the LOAD directive, and allows the
  6099.               source files to force a symbol and address to be loaded into the
  6100.               REF/DEF table for later use. The `D' TAG is generated by the user
  6101.               and allows the user to have a bias or offset added on all TAGs
  6102.               containing a relocatable address. The G,H,I,K,#TAGs are currently
  6103.               not used or no more information is available on them.
  6104.  
  6105. T   SPECIAL CTRL TAG USE:   Field 1                       Field 2     Field 3
  6106. -   ----------------------  ----------------------------  ----------  ---------
  6107. 7 = Checksum Indicator      Checksum Value
  6108. 8 = Checksum Ignore         Any Data Value
  6109. D = Load Bias or Offset     Load Bias (user added)
  6110. U = Force a REF/DEF load    Absolute Address              Symbol
  6111. F = End of Record (line #)
  6112. : = End of File  (99/4 AS)
  6113. -   ----------------------  ----------------------------  ----------  ---------
  6114. G =
  6115. H =
  6116. I = Program Identification
  6117. K = External Macro REF      Relocatable Address of Chain  Symbol
  6118. # =                         Absolute Value                            >007F????
  6119.  
  6120. -------------------------------------------------------------------------------
  6121. ALL & AORG: These TAGs are found in code which is AORG or used to mark Absolute
  6122.             Data (B) like OPcodes, etc. in all other kinds of segments.
  6123.  
  6124. T   ALL & AORG TAG USE:     Field 1                       Field 2     Field 3
  6125. -   ----------------------  ----------------------------  ----------  ---------
  6126. 1 = Entry Point Definition  Absolute Address
  6127. 4 = External References     Absolute Address
  6128. 6 = External Definitions    Absolute Address
  6129. 6 = Load Address            Absolute Address
  6130. B = Data                    Absolute Value
  6131.  
  6132. -------------------------------------------------------------------------------
  6133. PSEG TAG USE: These TAGs are found in code which is inbetween the PSEG and PEND
  6134.               Assembler Directives. This is the default mode of all code which
  6135.               is not marked with one of the XSEG directives. Also, code marked
  6136.               with the RORG directive will end up as PSEG tagged code. These
  6137.               TAGs define all the PROGRAM segments in an assembled program, and
  6138.               also mark the main-relocatable part of the program. Program ID,
  6139.               (Field 2) is 8 bytes long, instead of the normal 6 byte field,and
  6140.               always is the first TAG in any object file,and only appears once.
  6141.               If the IDT directive was not used in the source file, then this
  6142.               field is padded out with 8 space characters.
  6143.  
  6144. T   PSEG TAG USE:           Field 1                       Field 2     Field 3
  6145. -   ----------------------  ----------------------------  ----------  ---------
  6146. 0 = Program Identification  Total Length of all PSEG's    Program ID
  6147. 2 = Entry Point Definition  Relocatable Address
  6148. 3 = External References     Relocatable Address of Chain  Symbol
  6149. 5 = External Definitions    Relocatable Address of Chain  Symbol
  6150. V = External Secondary REF  Relocatable Address of Chain  Symbol
  6151. A = Load Address            Relocatable Address
  6152. C = Data                    Relocatable Address
  6153.  
  6154. -------------------------------------------------------------------------------
  6155. DSEG TAG USE: These TAGs are found in code which is inbetween the DSEG and DEND
  6156.               Assembler Directives. It defines all DATA segments in a assembled
  6157.               program, and also marks the modifiable segments of the program.
  6158.               The second field in the `M'TAG is fixed to the symbol of `$DATA',
  6159.               and only can appear once in any given object file.
  6160.  
  6161. T   DSEG TAG USE:           Field 1                       Field 2     Field 3
  6162. -   ----------------------  ----------------------------  ----------  ---------
  6163. M = Module Identification   Total Length of all DSEG's    $DATA       >0000
  6164. X = External References     Relocatable Address of Chain  Symbol      >0000
  6165. W = External Definitions    Relocatable Address of Chain  Symbol      >0000
  6166. V = External Secondary REF  Relocatable Address of Chain  Symbol      >0000
  6167. S = Load Address            Relocatable Address
  6168. T = Data                    Relocatable Address
  6169.  
  6170. -------------------------------------------------------------------------------
  6171. CSEG TAG USE: These TAGs are found in code which is inbetween the CSEG and CEND
  6172.               Assembler Directives. It defines all the COMMON Module Segments
  6173.               in an assembled program. Since the COMMON segments are defined as
  6174.               separate modules with unique ID's, then these TAGs are useful in
  6175.               marking the page-relocatable parts of the program. The second
  6176.               field in the `M' TAG is defined by each CSEG [`string'], and can
  6177.               be any 6 byte Symbol. All CSEG directives using the same Symbol,
  6178.               are all considered part of the same module, and are all assigned
  6179.               the same Module No. Any CSEG directives without a Symbol, are all
  6180.               assigned the same default Symbol of`$BLANK' for use in the second
  6181.               field of the `M' TAG.
  6182.  
  6183. T   CSEG TAG USE:           Field 1                       Field 2     Field 3
  6184. -   ----------------------  ----------------------------  ----------  ---------
  6185. M = Modules Identification  Length of a certain Module #  Symbol      Module #.
  6186. X = External References     Relocatable Address of Chain  Symbol      Module #.
  6187. W = External Definitions    Relocatable Address of Chain  Symbol      Module #.
  6188. V = External Secondary REF  Relocatable Address of Chain  Symbol      Module #.
  6189. P = Load Address            Relocatable Address                       Module #.
  6190. N = Data                    Relocatable Address                       Module #.
  6191.  
  6192. ------------------------------------------------------------------------------
  6193. THE FOLLOWING TEXT DEFINES ALL THE SPECIAL MNEMONICS IN A DX/10 SOURCE FILE:
  6194. -------------------------------------------------------------------------------
  6195. These OPcodes are found in all 9900 based systems starting at the 9900CPU chip,
  6196. all the way up to the latest 99000 CPU. But due to the fact that these OPcodes
  6197. output a special CRU address on the system bus, they can't be used correctly in
  6198. 99/4a type systems. Only the RSET and IDLE should ever be attempted in a 99/4a
  6199. system, but we don't recommend it. These OPcodes are designed to interface with
  6200. special CRU hardware to control various user-defined functions.
  6201.  
  6202.   OPCODE    Meanings of Mnemonics and Opcodes  0 1 2 3 4 5 6 7 8 9 A B C D E F
  6203. ---- ----- ---------------------------------- ---------------------------------
  6204. IDLE >0340 IDLE until a reset, interrupt,load |0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0|
  6205. RSET >0360 ReSET status bits 12-15 to zero    |0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0|
  6206. CKON >03A0 ClocK ON                    (user) |0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0|
  6207. CKOF >03C0 ClocK OFF                   (user) |0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0|
  6208. LREX >03E0 Load or REstart eXecution   (user) |0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0|
  6209.  
  6210. -------------------------------------------------------------------------------
  6211. These OPcodes are only found in 9940 based systems using the 9940 CPU chip. But
  6212. since they assemble using the XOP OPcode, it is possible to make them available
  6213. on other 9900 based systems. On the 99/4a the DCA (XOP 0)vectors are: CRU >1B00
  6214. WS >2800, PC >4028 (Extended GPL mode),and for the DCS (XOP 2) the vectors are:
  6215. WS >FFD8, PC >FFF8. The LIIM opcode is a special verion of the normal LIMI for
  6216. the 9940, as the 9940 only has max. 4 levels of interrupts and the mormal LIMI
  6217. allows up to 16 levels of interrupts. The LIIM is not needed on the 99/4a as
  6218. this system only has one fixed level of interrupts; but if you need to emulate
  6219. this OPcode for any reason, the vectors on the 99/4a for LIIM (XOP 0) are:
  6220. WS >83A0, PC >8300.
  6221.  
  6222.   OPCODE    Meanings of Mnemonics and Opcodes  0 1 2 3 4 5 6 7 8 9 A B C D E F
  6223. ---- ----- ---------------------------------- ---------------------------------
  6224. DCA  >2C00 Decimal Correct Addition      XOP0 |0 0 1 0 1 1|0 0 0 0| Ts|   S   |
  6225. DCS  >2C40 Decimal Correct Subtraction   XOP1 |0 0 1 0 1 1|0 0 0 1| Ts|   S   |
  6226. LIIM >2C80 Load Immediate Interrupt Mask XOP2 |0 0 1 0 1 1|0 0 1 0|   x   | n |
  6227.  
  6228.  
  6229. -------------------------------------------------------------------------------
  6230. These OPcodes are found in the 990/10 mainframe system, and also in any 99000
  6231. based system. They are designed to support the 99610 memory mapper, to allow
  6232. easy access to another page without the need of switching a page someplace.
  6233. They can also be emulated in a 9995 based system thru the MID interrupt.
  6234.  
  6235.   OPCODE    Meanings of Mnemonics and Opcodes  0 1 2 3 4 5 6 7 8 9 A B C D E F
  6236. ---- ----- ---------------------------------- ---------------------------------
  6237. LDS  >0780 Long Distance Source               |0 0 0 0 0 1 1 1 1 0| Ts|   S   |
  6238. LDD  >07C0 Long Distance Destination          |0 0 0 0 0 1 1 1 1 1| Ts|   S   |
  6239.  
  6240. -------------------------------------------------------------------------------
  6241. These OPcodes currently are not known about in any 9900 or possible 9900 based
  6242. system,only the LMF has one small line about it in the 99000 manual. Its format
  6243. is LMF Rx,x; where the Rx can be any workspace register from 0 thru 15, and the
  6244. immediate can be a `0' or a `1'. The XIT opcode does not have any operands, and
  6245. is just used by itself. It is not mentioned in any 9900 or 99000 reference
  6246. manual, and lloks to me like a special opcode to return or eXIT from something.
  6247.  
  6248.   OPCODE    Meanings of Mnemonics and Opcodes  0 1 2 3 4 5 6 7 8 9 A B C D E F
  6249. ---- ----- ---------------------------------- ---------------------------------
  6250. LMF  >0320 ????(not in any known 9900 system) |0 0 0 0 0 0 1 1 0 0 1|n|   W   |
  6251. ---- ----- ---------------------------------- ---------------------------------
  6252. XIT  >0C0E ????(not in any known 9900 system) |0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 0|
  6253.  
  6254. -------------------------------------------------------------------------------
  6255. These OPcodes are only found in 99000 based systems using the 99110A CPU chip.
  6256. They are designed to provide a floating point package for 9900 based systems;
  6257. but they can also be emulated in a 9995 based system thru the MID interrupt.
  6258.  
  6259.   OPCODE    Meanings of Mnemonics and Opcodes  0 1 2 3 4 5 6 7 8 9 A B C D E F
  6260. ---- ----- ---------------------------------- ---------------------------------
  6261. AR   >0C40 Add Real                           |0 0 0 0 1 1 0 0 0 1| Ts|   S   |
  6262. CIR  >0C80 Convert Integer to Real            |0 0 0 0 1 1 0 0 1 0| Ts|   S   |
  6263. SR   >0CC0 Subtract Real                      |0 0 0 0 1 1 0 0 1 1| Ts|   S   |
  6264. MR   >0D00 Multiply Real                      |0 0 0 0 1 1 0 1 0 0| Ts|   S   |
  6265. DR   >0D40 Divide   Real                      |0 0 0 0 1 1 0 1 0 1| Ts|   S   |
  6266. LR   >0D80 Load     Real                      |0 0 0 0 1 1 0 1 1 0| Ts|   S   |
  6267. STR  >0DC0 Store    Real                      |0 0 0 0 1 1 0 1 1 1| Ts|   S   |
  6268. ---- ----- ---------------------------------- ---------------------------------
  6269. CRI  >0C00 Convert  Real to Integer           |0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0|
  6270. NEGR >0C02 Negate   Real                      |0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0|
  6271. CRE  >0C04 Convert  Real to Extended integer  |0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0|
  6272. CRE  >0C06 Convert  Extended integer to Real  |0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0|
  6273.  
  6274. -------------------------------------------------------------------------------
  6275. These OPcodes are currently not found in any 9900 based system;but if emulated,
  6276. they are designed to provide an easy-to-use BCDecimal package for 9900 based
  6277. systems. They can be emulated in a 9995 based system thru the MID interrupt.
  6278.  
  6279.   OPCODE    Meanings of Mnemonics and Opcodes  0 1 2 3 4 5 6 7 8 9 A B C D E F
  6280. ---- ----- ---------------------------------- ---------------------------------
  6281. AD   >0E40 Add Decimal                        |0 0 0 0 1 1 1 0 0 1| Ts|   S   |
  6282. CID  >0E80 Convert Integer to Decimal         |0 0 0 0 1 1 1 0 1 0| Ts|   S   |
  6283. SD   >0EC0 Subtract Decimal                   |0 0 0 0 1 1 1 0 1 1| Ts|   S   |
  6284. MD   >0F00 Multiply Decimal                   |0 0 0 0 1 1 1 1 0 0| Ts|   S   |
  6285. DD   >0F40 Divide   Decimal                   |0 0 0 0 1 1 1 1 0 1| Ts|   S   |
  6286. LD   >0F80 Load     Decimal                   |0 0 0 0 1 1 1 1 1 0| Ts|   S   |
  6287. STD  >0FC0 Store    Decimal                   |0 0 0 0 1 1 1 1 1 1| Ts|   S   |
  6288. ---- ----- ---------------------------------- ---------------------------------
  6289. CDI  >0C01 Convert Decimal to Integer         |0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1|
  6290. CDE  >0C05 Convert Decimal to Extended integer|0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 1|
  6291. CED  >0C07 Convert Extended integer to Decimal|0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 1|
  6292. ------------------------------------------------------------------------------
  6293. THE FOLLOWING TEXT DEFINES ALL THE OPCODES AND MNEMONICS IN A 9900/99000 SYSTEM
  6294.  
  6295.   OPCODE    Meanings of Mnemonics and Opcodes  0 1 2 3 4 5 6 7 8 9 A B C D E F
  6296. ----- ---- ---------------------------------- ---------------------------------
  6297. >0000      (16 opcodes available)             |0 0 0 0 0 0 0 0 0 0 0 0|- - - -|
  6298. >0010      ( 8 opcodes available)             |0 0 0 0 0 0 0 0 0 0 0 1 0|- - -|
  6299. >0018      ( 4 opcodes available)             |0 0 0 0 0 0 0 0 0 0 0 1 1 0|- -|
  6300. >001C SRAM Shift Right Arithmetic Multiple  32|0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0|
  6301. >001D SLAM Shift Left  Arithmetic Multiple  32|0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1|
  6302. >001E      ( 2 opcodes available)             |0 0 0 0 0 0 0 0 0 0 0 1 1 1 1|-|
  6303. >0020      ( 8 opcodes available)             |0 0 0 0 0 0 0 0 0 0 1 0 0|- - -|
  6304. >0028      ( 1 opcode  available)             |0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0|
  6305. >0029 AM   Add Multiple                     32|0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1|
  6306. >002A SM   Subtract Multiple                32|0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0|
  6307. >002B      ( 1 opcode  available)             |0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 1|
  6308. >002C      ( 4 opcodes available)             |0 0 0 0 0 0 0 0 0 0 1 0 1 1|- -|
  6309. >0030      (16 opcodes available)             |0 0 0 0 0 0 0 0 0 0 1 1|- - - -|
  6310. >0040      (64 opcodes available)             |0 0 0 0 0 0 0 0 0 1|- - - - - -|
  6311. >0080 LST  Load STatus register               |0 0 0 0 0 0 0 0 1 0 0 0|   W   |
  6312. >0090 LWP  Load Workspace Pointer             |0 0 0 0 0 0 0 0 1 0 0 1|   W   |
  6313. >00A0      (16 opcodes available)             |0 0 0 0 0 0 0 0 1 0 1 0|- - - -|
  6314. >00B0 BLSK Branch immediate & Link to StacK   |0 0 0 0 0 0 0 0 1 0 1 1|   W   |
  6315. >00C0      (64 opcodes available)             |0 0 0 0 0 0 0 0 1 1|- - - - - -|
  6316. >0100 EVAD EValuate ADdress instruction       |0 0 0 0 0 0 0 1 0 0| Ts|   S   |
  6317. >0140 BIND Branch INDirect                    |0 0 0 0 0 0 0 1 0 1| Ts|   S   |
  6318. >0180 DIVS DIVide-Signed                      |0 0 0 0 0 0 0 1 1 0| Ts|   S   |
  6319. >01C0 MPYS MultiPlY-Signed                    |0 0 0 0 0 0 0 1 1 1| Ts|   S   |
  6320. >0200 LI   Load Immediate                     |0 0 0 0 0 0 1 0 0 0 0 0|   W   |
  6321. >0210      (16 opcodes available)             |0 0 0 0 0 0 1 0 0 0 0 1|- - - -|
  6322. >0220 AI   Add  Immediate                     |0 0 0 0 0 0 1 0 0 0 1 0|   W   |
  6323. >0230      (16 opcodes available)             |0 0 0 0 0 0 1 0 0 0 1 1|- - - -|
  6324. >0240 ANDI AND  Immediate                     |0 0 0 0 0 0 1 0 0 1 0 0|   W   |
  6325. >0250      (16 opcodes available)             |0 0 0 0 0 0 1 0 0 1 0 1|- - - -|
  6326. >0260 ORI  OR   Immediate                     |0 0 0 0 0 0 1 0 0 1 1 0|   W   |
  6327. >0270      (16 opcodes available)             |0 0 0 0 0 0 1 0 0 1 1 1|- - - -|
  6328. >0280 CI   Compare Immediate                  |0 0 0 0 0 0 1 0 1 0 0 0|   W   |
  6329. >0290      (16 opcodes available)             |0 0 0 0 0 0 1 0 1 0 0 1|- - - -|
  6330. >02A0 STWP STore Workspace Pointer            |0 0 0 0 0 0 1 0 1 0 1 0|   W   |
  6331. >02B0      (16 opcodes available)             |0 0 0 0 0 0 1 0 1 0 1 1|- - - -|
  6332. >02C0 STST STore STatus                       |0 0 0 0 0 0 1 0 1 1 0 0|   W   |
  6333. >02D0      (16 opcodes available)             |0 0 0 0 0 0 1 0 1 1 0 1|- - - -|
  6334. >02E0 LWPI Load Workspace Pointer Immediate   |0 0 0 0 0 0 1 0 1 1 1 0 0 0 0 0|
  6335. >02E1      ( 1 opcode  available)             |0 0 0 0 0 0 1 0 1 1 1 0 0 0 0 1|
  6336. >02E2      ( 2 opcodes available)             |0 0 0 0 0 0 1 0 1 1 1 0 0 0 1|-|
  6337. >02E4      ( 4 opcodes available)             |0 0 0 0 0 0 1 0 1 1 1 0 0 1|- -|
  6338. >02E8      ( 8 opcodes available)             |0 0 0 0 0 0 1 0 1 1 1 0 1|- - -|
  6339. >02F0      (16 opcodes available)             |0 0 0 0 0 0 1 0 1 1 1 1|- - - -|
  6340. >0300 LIMI Load Interrupt Mask Immediate      |0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0|
  6341. >0301 CR   Compare Reals                    32|0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1|
  6342. >0302 MM   Multiply Multiple                32|0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0|
  6343. >0303      ( 1 opcode  available)             |0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1|
  6344. >0304      ( 4 opcodes available)             |0 0 0 0 0 0 1 1 0 0 0 0 0 1|- -|
  6345. >0308      ( 8 opcodes available)             |0 0 0 0 0 0 1 1 0 0 0 0 1|- - -|
  6346. >0310      (16 opcodes available)             |0 0 0 0 0 0 1 1 0 0 0 1|- - - -|
  6347. >0320 LMF  ????(not in any known 9900 system) |0 0 0 0 0 0 1 1 0 0 1|n|   W   |
  6348. >0340 IDLE IDLE until a reset, interrupt,load |0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0|
  6349. >0341      ( 1 opcode  available)             |0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 1|
  6350. >0342      ( 2 opcodes available)             |0 0 0 0 0 0 1 1 0 1 0 0 0 0 1|-|
  6351. >0344      ( 4 opcodes available)             |0 0 0 0 0 0 1 1 0 1 0 0 0 1|- -|
  6352. >0348      ( 8 opcodes available)             |0 0 0 0 0 0 1 1 0 1 0 0 1|- - -|
  6353. >0350      (16 opcodes available)             |0 0 0 0 0 0 1 1 0 1 0 1|- - - -|
  6354.  
  6355.   OPCODE    Meanings of Mnemonics and Opcodes  0 1 2 3 4 5 6 7 8 9 A B C D E F
  6356. ----- ---- ---------------------------------- ---------------------------------
  6357. >0360 RSET ReSET the status bits 12-15 to zero|0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0|
  6358. >0361      ( 1 opcode  available)             |0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 1|
  6359. >0362      ( 2 opcodes available)             |0 0 0 0 0 0 1 1 0 1 1 0 0 0 1|-|
  6360. >0364      ( 4 opcodes available)             |0 0 0 0 0 0 1 1 0 1 1 0 0 1|- -|
  6361. >0368      ( 8 opcodes available)             |0 0 0 0 0 0 1 1 0 1 1 0 1|- - -|
  6362. >0370      (16 opcodes available)             |0 0 0 0 0 0 1 1 0 1 1 1|- - - -|
  6363. >0380 RTWP ReTurn with Workspace Pointer      |0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0|
  6364. >0381      ( 1 opcode  available)             |0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1|
  6365. >0382      ( 2 opcodes available)             |0 0 0 0 0 0 1 1 1 0 0 0 0 0 1|-|
  6366. >0384      ( 4 opcodes available)             |0 0 0 0 0 0 1 1 1 0 0 0 0 1|- -|
  6367. >0388      ( 8 opcodes available)             |0 0 0 0 0 0 1 1 1 0 0 0 1|- - -|
  6368. >0390      (16 opcodes available)             |0 0 0 0 0 0 1 1 1 0 0 1|- - - -|
  6369. >03A0 CKON ClocK ON                    (user) |0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0|
  6370. >03A1      ( 1 opcode  available)             |0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1|
  6371. >03A2      ( 2 opcodes available)             |0 0 0 0 0 0 1 1 1 0 1 0 0 0 1|-|
  6372. >03A4      ( 4 opcodes available)             |0 0 0 0 0 0 1 1 1 0 1 0 0 1|- -|
  6373. >03A8      ( 8 opcodes available)             |0 0 0 0 0 0 1 1 1 0 1 0 1|- - -|
  6374. >03B0      (16 opcodes available)             |0 0 0 0 0 0 1 1 1 0 1 1|- - - -|
  6375. >03C0 CKOF ClocK OFf                   (user) |0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0|
  6376. >03C1      ( 1 opcode  available)             |0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1|
  6377. >03C2      ( 2 opcodes available)             |0 0 0 0 0 0 1 1 1 1 0 0 0 0 1|-|
  6378. >03C4      ( 4 opcodes available)             |0 0 0 0 0 0 1 1 1 1 0 0 0 1|- -|
  6379. >03C8      ( 8 opcodes available)             |0 0 0 0 0 0 1 1 1 1 0 0 1|- - -|
  6380. >03D0      (16 opcodes available)             |0 0 0 0 0 0 1 1 1 1 0 1|- - - -|
  6381. >03E0 LREX Load or REstart eXecution   (user) |0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0|
  6382. >03E1      ( 1 opcode  available)             |0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 1|
  6383. >03E2      ( 2 opcodes available)             |0 0 0 0 0 0 1 1 1 1 1 0 0 0 1|-|
  6384. >03E4      ( 4 opcodes available)             |0 0 0 0 0 0 1 1 1 1 1 0 0 1|- -|
  6385. >03E8      ( 8 opcodes available)             |0 0 0 0 0 0 1 1 1 1 1 0 1|- - -|
  6386. >03F0      (16 opcodes available)             |0 0 0 0 0 0 1 1 1 1 1 1|- - - -|
  6387. >0400 BLWP Branch and Load Workspace Pointer  |0 0 0 0 0 1 0 0 0 0| Ts|   S   |
  6388. >0440 B    Branch                             |0 0 0 0 0 1 0 0 0 1| Ts|   S   |
  6389. >0480 X    eXecute                            |0 0 0 0 0 1 0 0 1 0| Ts|   S   |
  6390. >04C0 CLR  CLeaR operand to zeros             |0 0 0 0 0 1 0 0 1 1| Ts|   S   |
  6391. >0500 NEG  NEGate operand                     |0 0 0 0 0 1 0 1 0 0| Ts|   S   |
  6392. >0540 INV  INVert operand                     |0 0 0 0 0 1 0 1 0 1| Ts|   S   |
  6393. >0580 INC  INCrement operand by one           |0 0 0 0 0 1 0 1 1 0| Ts|   S   |
  6394. >05C0 INCT INCrement operand by Two           |0 0 0 0 0 1 0 1 1 1| Ts|   S   |
  6395. >0600 DEC  DECrement operand by one           |0 0 0 0 0 1 1 0 0 0| Ts|   S   |
  6396. >0640 DECT DECrement operand by Two           |0 0 0 0 0 1 1 0 0 1| Ts|   S   |
  6397. >0680 BL   Branch and Link                    |0 0 0 0 0 1 1 0 1 0| Ts|   S   |
  6398. >06C0 SWPB SWaP Bytes                         |0 0 0 0 0 1 1 0 1 1| Ts|   S   |
  6399. >0700 SETO SET operand to Ones                |0 0 0 0 0 1 1 1 0 0| Ts|   S   |
  6400. >0740 ABS  ABSolute operand                   |0 0 0 0 0 1 1 1 0 1| Ts|   S   |
  6401. >0780 LDS  Long Distance Source               |0 0 0 0 0 1 1 1 1 0| Ts|   S   |
  6402. >07C0 LDD  Long Distance Destination          |0 0 0 0 0 1 1 1 1 1| Ts|   S   |
  6403. >0800 SRA  Shift register Right Arithmetic    |0 0 0 0 1 0 0 0| count |   W   |
  6404. >0900 SRL  Shift register Right Logical       |0 0 0 0 1 0 0 1| count |   W   |
  6405. >0A00 SLA  Shift register Left  Arithmetic    |0 0 0 0 1 0 1 0| count |   W   |
  6406. >0B00 SRC  Shift register Right Circular      |0 0 0 0 1 0 1 1| count |   W   |
  6407. >0C00 CRI  Convert Real to Integer            |0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0|
  6408. >0C01 CDI  Convert Decimal to Integer         |0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1|
  6409. >0C02 NEGR NEGate Real                        |0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0|
  6410. >0C03      ( 1 opcode available)              |0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1|
  6411. >0C04 CRE  Convert Real to Extended integer   |0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0|
  6412. >0C05 CDE  Convert Decimal to Extended integer|0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 1|
  6413. >0C06 CER  Convert Extended integer to Real   |0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0|
  6414. >0C07 CED  Convert Extended integer to Decimal|0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 1|
  6415. >0C08      ( 1 opcode available)              |0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0|
  6416.  
  6417.   OPCODE    Meanings of Mnemonics and Opcodes  0 1 2 3 4 5 6 7 8 9 A B C D E F
  6418. _____ ____ __________________________________ _________________________________
  6419. >0C09 TMB  Test Memory Bit                  32|0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 1|
  6420. >0C0A TCMB Test and Clear Memory Bit        32|0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 0|
  6421. >0C0B TSMB Test and Set   Memory Bit        32|0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 1|
  6422. >0C0C      ( 2 opcodes available)             |0 0 0 0 1 1 0 0 0 0 0 0 1 1 0|-|
  6423. >0C0E XIT  ????(not in any known 9900 system) |0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 0|
  6424. >0C0F      ( 1 opcode  available)             |0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 1|
  6425. >0C10      (16 opcodes available)             |0 0 0 0 1 1 0 0 0 0 0 1|- - - -|
  6426. >0C20      (32 opcodes available)             |0 0 0 0 1 1 0 0 0 0 1|- - - - -|
  6427. >0C40 AR   Add Real                           |0 0 0 0 1 1 0 0 0 1| Ts|   S   |
  6428. >0C80 CIR  Convert Integer to Real            |0 0 0 0 1 1 0 0 1 0| Ts|   S   |
  6429. >0CC0 SR   Subtract Real                      |0 0 0 0 1 1 0 0 1 1| Ts|   S   |
  6430. >0D00 MR   Multiply Real                      |0 0 0 0 1 1 0 1 0 0| Ts|   S   |
  6431. >0D40 DR   Divide   Real                      |0 0 0 0 1 1 0 1 0 1| Ts|   S   |
  6432. >0D80 LR   Load     Real                      |0 0 0 0 1 1 0 1 1 0| Ts|   S   |
  6433. >0DC0 SR   Store    Real                      |0 0 0 0 1 1 0 1 1 1| Ts|   S   |
  6434. >0E40 AD   Add      Decimal                   |0 0 0 0 1 1 1 0 0 1| Ts|   S   |
  6435. >0E80 CID  Convert Integer to Decimal         |0 0 0 0 1 1 1 0 1 0| Ts|   S   |
  6436. >0EC0 SD   Subtract Decimal                   |0 0 0 0 1 1 1 0 1 1| Ts|   S   |
  6437. >0F00 MD   Multiply Decimal                   |0 0 0 0 1 1 1 1 0 0| Ts|   S   |
  6438. >0F40 DD   Divide   Decimal                   |0 0 0 0 1 1 1 1 0 1| Ts|   S   |
  6439. >0F80 LD   Load     Decimal                   |0 0 0 0 1 1 1 1 1 0| Ts|   S   |
  6440. >0FC0 SD   Store    Decimal                   |0 0 0 0 1 1 1 1 1 1| Ts|   S   |
  6441. >1000 JMP  unconditional JuMP                 |0 0 0 1 0 0 0 0|  displacement |
  6442. >1100 JLT  Jump if Less Than                  |0 0 0 1 0 0 0 1|  displacement |
  6443. >1200 JLE  Jump if Low or Equal               |0 0 0 1 0 0 1 0|  displacement |
  6444. >1300 JEQ  Jump if EQual                      |0 0 0 1 0 0 1 1|  displacement |
  6445. >1400 JHE  Jump if High or Equal              |0 0 0 1 0 1 0 0|  displacement |
  6446. >1500 JGT  Jump if Greater Than               |0 0 0 1 0 1 0 1|  displacement |
  6447. >1600 JNE  Jump if Not Equal                  |0 0 0 1 0 1 1 0|  displacement |
  6448. >1700 JNC  Jump if No Carry                   |0 0 0 1 0 1 1 1|  displacement |
  6449. >1800 JOC  Jump if On Carry                   |0 0 0 1 1 0 0 0|  displacement |
  6450. >1900 JNO  Jump if No Overflow                |0 0 0 1 1 0 0 1|  displacement |
  6451. >1A00 JL   Jump if logical Low                |0 0 0 1 1 0 1 0|  displacement |
  6452. >1B00 JH   Jump if logical High               |0 0 0 1 1 0 1 1|  displacement |
  6453. >1C00 JOP  Jump if Odd Parity                 |0 0 0 1 1 1 0 0|  displacement |
  6454. >1D00 SBO  Set CRU Bit to One                 |0 0 0 1 1 1 0 1|  displacement |
  6455. >1E00 SBZ  Set CRU Bit to Zero                |0 0 0 1 1 1 1 0|  displacement |
  6456. >1F00 TB   Test Bit                           |0 0 0 1 1 1 1 1|  displacement |
  6457. >2000 COC  Compare Ones Corresponding         |0 0 1 0 0 0|  WsD  | Ts|   S   |
  6458. >2400 CZC  Compare Zeros Corresponding        |0 0 1 0 0 1|  WsD  | Ts|   S   |
  6459. >2800 XOR  eXclusive OR                       |0 0 1 0 1 0|  WsD  | Ts|   S   |
  6460. >2C00 XOP  eXtended OPeration & (DCA,DCS,LIIM)|0 0 1 0 1 1|   n   | Ts|   S   |
  6461. >3000 LDCR LoaD Communication Register        |0 0 1 1 0 0| count | Ts|   S   |
  6462. >3400 STCR STore Communication Register       |0 0 1 1 0 1| count | Ts|   S   |
  6463. >3800 MPY  MultiPlY                           |0 0 1 1 1 0|  WsD  | Ts|   S   |
  6464. >3C00 DIV  DIVide                             |0 0 1 1 1 1|  WsD  | Ts|   S   |
  6465. >4000 SZC  Set Zeros Corresponding            |0 1 0 0| Td|   D   | Ts|   S   |
  6466. >5000 SZCB Set Zeros Corresponding, Byte      |0 1 0 1| Td|   D   | Ts|   S   |
  6467. >6000 S    Subtract words                     |0 1 1 0| Td|   D   | Ts|   S   |
  6468. >7000 SB   Subtract Bytes                     |0 1 1 1| Td|   D   | Ts|   S   |
  6469. >8000 C    Compare words                      |1 0 0 0| Td|   D   | Ts|   S   |
  6470. >9000 CB   Compare Bytes                      |1 0 0 1| Td|   D   | Ts|   S   |
  6471. >A000 A    Add words                          |1 0 1 0| Td|   D   | Ts|   S   |
  6472. >B000 AB   Add Bytes                          |1 0 1 1| Td|   D   | Ts|   S   |
  6473. >C000 MOV  MOVe words                         |1 1 0 0| Td|   D   | Ts|   S   |
  6474. >D000 MOVB MOVe Bytes                         |1 1 0 1| Td|   D   | Ts|   S   |
  6475. >E000 SOC  Set Ones Corresponding             |1 1 1 0| Td|   D   | Ts|   S   |
  6476. >F000 SOCB Set Ones Corresponding, Byte       |1 1 1 1| Td|   D   | Ts|   S   |
  6477. -------------------------------------------------------------------------------
  6478. <eof-12.29.96>
  6479.